If you are here I’m sure you know what the GDPR is. In this post I want to explain you how to make Google Analytics GDPR compliant in 5 simple steps:

1) Anonymize the ips

You can anonymize the ips you send to Google Analytics simply editing your code or enabling the option in the plugin/module you use to publish the javascript code. To edit the code just add the anonymize_ip option to your configuration. Here is an example:

<script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'UA-XXXX-XX', { 'anonymize_ip': true });
</script>

2) Disable data collection for advertising

Basically you need to turn off these settings in your analytics account:

3) Update your data retention settings

From the screen above click on the Data Retention link on the left hand side menu. Update the settings as you wish and save it.

4) Check that you’re not sending personal data to Google

To do it analyse the urls you’re sending from this screen:

You can use the keyword filter to be sure there are no personal data in your url:

 

5) Explain how you use Google Analytics in your privacy policy

The GDPR asks websites owners to be transparent so be clear about it. Update your privacy policy and be sure that the data processing is clearly stated.

If you think I’ve missed something please write a comment in the box below.

If you need a freelance developer to help you out whit these changes just contact me!

Posted in IT