Google Analytics tags
-
Check that
_config.yml
contains:ga_tracking: UA-2709176-10,G-5FG1HLH3XQ ga_tracking_anonymize_ip: true
-
Build this site.
-
Check that the
<head>
of_site/index.html
contains the following:<script async src="https://www.googletagmanager.com/gtag/js?id=UA-2709176-10"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-2709176-10', { 'anonymize_ip': true }); gtag('config', 'G-5FG1HLH3XQ', { 'anonymize_ip': true }); </script>
-
Comment-out
ga_tracking
from_config.yml
. -
Build this site.
-
Check that the
<head>
of_site/index.html
does not contain any GA tags. -
Restore
ga_tracking
in_config.yml
.