mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Merge pull request #1583 from alphagov/add-ga-settings
Standardise Google Analytics tracking across GaaP
This commit is contained in:
@@ -134,6 +134,13 @@
|
|||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||||
ga('create', 'UA-75215134-1', 'auto');
|
ga('create', 'UA-75215134-1', 'auto');
|
||||||
|
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');
|
ga('send', 'pageview');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -131,6 +131,13 @@
|
|||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||||
ga('create', 'UA-75215134-1', 'auto');
|
ga('create', 'UA-75215134-1', 'auto');
|
||||||
|
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');
|
ga('send', 'pageview');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,9 @@
|
|||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||||
ga('create', 'UA-75215134-1', 'auto');
|
ga('create', 'UA-75215134-1', 'auto');
|
||||||
|
ga('set', 'anonymizeIp', true);
|
||||||
|
ga('set', 'displayFeaturesTask', null);
|
||||||
|
ga('set', 'transport', 'beacon');
|
||||||
// strip UUIDs
|
// strip UUIDs
|
||||||
page = (window.location.pathname + window.location.search).replace(
|
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, '…'
|
/[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}/g, '…'
|
||||||
|
|||||||
Reference in New Issue
Block a user