5

I am using GA on website as everyone out there does same. In order to be GDPR complaint i had used "https://cookie-script.com" script to for user consent for one of my website and i notice for last two month my web stats have gone down almost by 80% as i am asking for explicit user consent. I implemented user consent since 1 july 2018.

My understanding was that i still need explicit user consent for using GA even of i have IP Anonymized & Advertising Features turned off in GA.

recently i came across few articles which say if we IP Anonymized & turn off Advertising Features then we don't need user consent is this the fact or still need user consent for using GA tracking.

My GA Script when asking user for explicit consent

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxx-x"></script>
<script type="text/plain" data-cookiescript="accepted">

    window.dataLayer = window.dataLayer || [];
    function gtag() { dataLayer.push(arguments); }
    gtag('js', new Date());
    gtag('config', 'xxxxxxx-x', { 'anonymize_ip': true });

</script>

NORMAL GA CODE

 <script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxx-x"></script>
<script type="text/plain" >

    window.dataLayer = window.dataLayer || [];
    function gtag() { dataLayer.push(arguments); }
    gtag('js', new Date());
    gtag('config', 'xxxxxxx-x', { 'anonymize_ip': true });

</script>

This script will allow tracking only when user agrees to cookies.

Based on my question can i use google analytics based on above setting without user consent?

1
  • The problem with "these" articles are wordings in them. Most of the time they write 'you may' not require. Google has just ensured that you have all the tools to comply. You would have to figure it out yourself as to how you are going to be compliant. Even if someone here says yes that doesn't mean it is working. Penalty being strict, I will recommend going through an expert for case to case basis.
    – AnkDasCo
    Commented Aug 19, 2018 at 7:09

1 Answer 1

7

First of all, I'm not a lawyer but after reading the new law and analyzing Analytics, that's how I've been working since GDPR. The problem is that you can't track any user information without their consent, so, I started turning down all tracking functions.

This is my roadmap:

  • Avoid cookies using the function: storage: none
  • Anonymize the IP with anonymizeIp:true
  • In case we use adverting, turn Advertising Features off

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

At this point, Google Analytics will not be able to use client-ID (there are no cookies) so no user could be tracked. Make sure you are not using user-ID either.

Some articles say that you can use localStore instead of Analytis cookies but that is also against GDPR policies so the only way is not saving any information related to our visitors at all.

Without cookies you will not be able to know:

  • Returning visitors. All visits will be considered as a new user.
  • Correct attribution in multichannel conversion.
  • Average time on page. It will be 0 for all sessions.

But you can have other metrics and dimensions without asking consent. This solution was checked by a lawyer but I'll recommend you to do the same before using it.

7
  • 1
    Very helpful answer, thanks. Where is the storage: 'none' officially documented? I failed to find it. How do I do the same for gtag? For gtag the anonymizeIp becomes anonymize_ip, that is documented. As for storage: none, the closest thing that I found is to set cookie_expires: 0 which turns it into a session cookie, see docs. It's not the same as no cookies at all...
    – Ali
    Commented Dec 2, 2019 at 22:07
  • And this post suggests a mysterious store_gac. What's that? Where is that documented?
    – Ali
    Commented Dec 2, 2019 at 22:07
  • You can see it here: support.google.com/analytics/answer/7519794?hl=en that's used in gtag code to disable the _gac cookie.
    – Emirodgar
    Commented Dec 4, 2019 at 7:44
  • You can find them under "Cookie and User Identification" (analytics.js: developers.google.com/analytics/devguides/collection/… and gtag.js: developers.google.com/analytics/devguides/collection/gtagjs/…). The second one (gtag.js) doesn't have the option to disable cookies so you can't set the storage to none. There is no sense to disable a cookie when you want to better understand people among services (ads, analytics, gtm, etc)
    – Emirodgar
    Commented Dec 5, 2019 at 7:29
  • Hmm. I have also lost the avg. time on page. Do you lose it too? Or did I do something wrong? Without the time spent on the pages, I see very little benefit in using Google Analytics: The server access logs are already giving me the same data.
    – Ali
    Commented Dec 10, 2019 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.