Quick Spark Tip:  One factor you might consider towards reaching GDPR compliance is anonymizing your Google Analytics, so your visitor’s IP address is obfuscated.  The change is easy – simply add a value of “anonymize_ip” and “true” to your tracking code.  The example below shows the latest global site tag “gtag.js” version of Google Analytics code, with the additional anonymize instruction highlighted in yellow:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXX-X"></script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-XXXXXXX-X', { 'anonymize_ip': true });

If you are using the older “analytics.js” version of Google Analytics code, you add a line to your code as shown and highlighted in yellow:

(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
ga('set', 'anonymizeIp', true);
ga('create', 'UA-XXXXXXX-X', 'auto');
ga('send', 'pageview');

Replace “UA-XXXXXXX-X” with your actual tracking ID number.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.