mirror of
https://github.com/GSA/notifications-admin.git
synced 2025-12-10 23:23:27 -05:00
Standardise Google Analytics tracking across GaaP
These are the settings that our analytics person has said we should be using across all the GaaP products. This commit also makes sure our tracking code is identical across all the templates that have it in (including the obsfucation of UUIDs). We may want to remove the ID obsfucation later on, but for now let’s make sure it’s happening consistently in all the places.
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)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
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');
|
||||
</script>
|
||||
|
||||
|
||||
@@ -131,6 +131,13 @@
|
||||
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');
|
||||
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');
|
||||
</script>
|
||||
|
||||
|
||||
@@ -141,6 +141,9 @@
|
||||
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');
|
||||
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, '…'
|
||||
|
||||
Reference in New Issue
Block a user