Note this page does not provide a legally verified solution – you should read the law and decide for yourself if these approaches are suitable before implementing yourself.

The legislation

Directive 2009/136/EC, which has come to be known as the Cookie Law

Cookies that do not require consent under

  • Cookies that are “strictly necessary” to fulfill the services requested by your site visitors.

Making Google Analytics Compliant

Google analytics does have options which can change how it operates.

 ga('create', 'UA-XXXXX-Y', {
  'storage': 'none',
  'anonymizeIp': true
 });

or

ga('create', 'UA-XXXXXXXX-X', 'auto'); 
ga('set', 'anonymizeIp', true); 
ga('send', 'pageview');
‘storage’: ‘none’

Google Analytics will not be able to use client-ID (there are no cookies) so no user could be tracked. Effects of this – you will not be able to know:

  • Returning visitors. All visits will be considered as a new user.
  • Correct attribution in multichannel conversion.
‘anonymizeIp’: true

the last octet of the IP address is changed to zero (12.123.45.789 becomes 12.123.45.0). This feature is called IP Masking in Google terminology.

Google Analytics uses the IP address to determine the location of where your visitors are visiting your website. Stripping the last octet of the IP address will result in a less accurate location, which may mean the region/city in a country might be wrong, but it will still allow trackign by country.

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published.