hacks-guide-minimal-mistake.../_includes/analytics-providers/google-universal.html
Bruno Coelho 13b2969bb8 Add option to anonymize analytics ip address (#1636)
* Add option to anonymize analytics ip address

* Add option to anonymize analytics ip address in google tag
2018-05-03 14:27:03 -04:00

10 lines
526 B
HTML

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.analytics.google.tracking_id }}', 'auto');
ga('set', 'anonymizeIp', {{ site.analytics.google.anonymize_ip | default: false }})
ga('send', 'pageview');
</script>