Dave3of5
Dave3of5

Reputation: 730

Google Analytics Cookie Banner

I've added the following Javascript to my landing page and there is no EU cookie banner appearing:

<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','//www.google-analytics.com/analytics.js','ga');

  ga('create', '[redacted]', 'auto');
  ga('send', 'pageview');

</script>

Is there something you need to enable in google analytics to show the EU cookie law banner? The one I mean has a grey background and says "Got It" for the acceptance.

Upvotes: 0

Views: 1403

Answers (1)

Liam
Liam

Reputation: 29760

I've added the following Javascript to my landing page and there is no EU cookie banner appearing

That code add's the Google Analytics tracking code into your site, it does not add a banner.

Is there something you need to enable in google analytics to show the EU cookie law banner?

No, Google does not do this for you, see above.


If you want a banner complying with the law in Europe you will need to code this yourself. There are several parts to this law, it's not just a banner that you can say "got it" to (though consent can be implied). You need to (among other things) give the user the option to opt out. You also need to say how and why you need the data in your T&Cs. Read here for more info

PECR do not set out exactly what information you must provide or how to provide it – this is up to you. The only requirement is that it must be “clear and comprehensive” information about your purposes. You must explain the way the cookies (or other similar technologies) work and what you use them for, and the explanation must be clear and easily available. Users must be able to understand the potential consequences of allowing the cookies. You may need to make sure the language and level of detail are appropriate for your intended audience.

Upvotes: 3

Related Questions