Track virtual page view when enabling basic view

So we can see what pages people go to after turning it on.
This commit is contained in:
Chris Hill-Scott
2018-08-02 12:33:13 +01:00
parent 77d96032bf
commit 8e6efadb23
3 changed files with 33 additions and 8 deletions

View File

@@ -128,10 +128,7 @@
ga('set', 'anonymizeIp', true);
ga('set', 'displayFeaturesTask', null);
ga('set', 'transport', 'beacon');
// strip UUIDs
page = (window.location.pathname + window.location.search).replace(
/[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}/g, '…'
)
ga('send', 'pageview', page);
page = window.location.pathname + window.location.search;
ga('send', 'pageview', stripUUIDs(page));
</script>
{% endblock %}