Forum Moderators: martinibuster

Message Too Old, No Replies

Google AdSense and Cookies (Cookie Law) email

EU Cookies

         

Badger37

1:35 pm on Jul 27, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi all,
I've just received an email from Google regarding AdSense and Cookies.
Cookie Law came in a couple of years ago and seems mostly to be a waste or time and just another irritation to website visitors. I was hoping that it would quietly go away!

The email from Google reads as if you now have to implement a 'consent mechanism' if you have already - are other people receiving these emails and what are peoples views (especially if they are in the UK like me).

I've put the Google email text below.
Thanks.



Google Ads Policy Team
Dear Publisher,

We want to let you know about a new policy about obtaining EU end-users’ consent that reflects regulatory and best practice guidance. It clarifies your duty to obtain end-user consent when you use products like Google AdSense, DoubleClick for Publishers and DoubleClick Ad Exchange.

Please review our new EU user consent policy as soon as possible. This requires that you obtain EU end users’ consent to the storing and accessing of cookies and other information, and to the data collection, sharing and usage that takes place when you use Google products. It does not affect any provisions on data ownership in your contract.

Please ensure that you comply with this policy as soon as possible, and not later than 30 September 2015.

If your site or app does not have a compliant consent mechanism, you should implement one now. To make this process easier for you, we have compiled some helpful resources at cookiechoices.org.

This policy change is being made in response to best practice and regulatory requirements issued by the European data protection authorities. These requirements are reflected in changes that have been recently made on Google’s own websites.
Thank you in advance for your understanding and cooperation.
Regards,
The Google Policy Team

Badger37

10:01 am on Aug 15, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



I'm also trying to build a simple solution - one that scrolls with the page so doesn't cover any ads. I'm tweaking Silktide's CookieConsent v2.

I'm struggling with the banner placement using their 'container' option.
container (string: CSS selector)
The element you want the Cookie Consent notification to be appended to
.

Using "container":"body" works (body is the default anyway) but I can't work out how to use string: CSS selector.

Is anyone able to point me in the right direction?

I've also asked on their Github page:
[github.com...]

Thanks.

envintus

12:50 pm on Aug 15, 2015 (gmt 0)

10+ Year Member



Hi Everyone,

I work with @netmeg quite a bit by fulfilling most of her development needs. The following is what I came up with for the EU cookie notification, which is very basic and can be served via Google Tag Manager or dropped in on any website. Please note that I wrote this yesterday and did test it and am able to confirm that it does work. However, that does not mean it is perfect, so if anyone feels inclined to do so please submit patches/pull requests on Github. I'd really appreciate the feedback.

[github.com...]

EDIT
As soon as I can I'll update the readme with instructions on how to serve this on your site via GTM or by dropping it in say your footer. As well as basic steps on performing a functional test. Right now I'm on vacation, but once I get a half hour to do this, I will.

Hope you all find this helpful. Thanks!

- Hunter

netmeg

2:11 pm on Aug 15, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That's my developer dude up there ^^^.

Badger37

4:04 pm on Aug 15, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



@envintus @netmeg
Have you got a working demo available to see? :)

vordmeister

4:13 pm on Aug 15, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



Thank you so much for writing and sharing the code @envintus. I pasted it onto a blank html page and it works brilliantly. It is nice and simple and without hundreds of lines of flashing or popping up - It would have taken me days to write that myself.

ken_b

4:24 pm on Aug 15, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



@envintus: Welcome to the forum and thanks for sharing that code.
.

netmeg

4:26 pm on Aug 15, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



We will put it on a demo site and open it to the world in a day or two.

Badger37

4:53 pm on Aug 15, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



Thanks.

"compianct" :)

ken_b

5:04 pm on Aug 15, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks Netmeg.

.

vordmeister

6:26 pm on Aug 15, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



How do you go about setting the path in the javascript cookie so it applies to the whole website rather than just a subdirectory? I am no good at javascript and the relevant line in the code builds the information in a way that is too clever for me.

robzilla

11:30 pm on Aug 15, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Cookies are set on a per domain basis, not per (sub)directory.

Note that the <script> tags should probably not appear in the .js file. Best not to inline the code; it'll be easier to make changes later on.

ChanandlerBong

11:09 am on Aug 16, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



OK, I've caught the dumb this morning. I've pasted that code onto a page that only has html/head/body tags and nothing happens when I call it on my server. Doing it inline, so the script tags are left in place.

?

Badger37

12:22 pm on Aug 16, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



I've used JSBIN (online JS debugging etc.), pasted the complete script and get the cookies message displayed as expected.

ember

4:01 pm on Aug 16, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've pasted that code onto a page that only has html/head/body tags and nothing happens when I call it on my server.


Same here.

vordmeister

4:08 pm on Aug 16, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



I guess you are putting the code in the body section? Worked for me when I did that.

envintus

7:34 pm on Aug 16, 2015 (gmt 0)

10+ Year Member



Hey Everyone,

Just checking in and hopefully later tonight I'll have the README updated on Github.

Replying in the order they came:
@robzilla; Great catch -- I originally wrote this as inline JavaScript, because we serve it via GTM, but needed to add it to a file for the sake of Github. I'll fix that now.
@vordmeister; Including this JavaScript where ever you include the rest of your CSS/JS. It will work regardless of what page the user is on and the div ID, class, markup, etc. can be customized directly in the code. It's as simple as I know how make it.
@ChanandlerBong; Hey, did it work? Sorry about the script tags in the .js file, that was for the sake of Github, but I'm correcting it in a moment. If it still does not work please check for JavaScript related errors in your browsers console.
@embeer; Got any errors in your browser console?
@vordmeister; It should work anywhere on the page. It's not bound to any third-party library such as jQuery. It's 100% native JavaScript.

ember

8:41 pm on Aug 16, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



No, nothing. Dumb question - does it only show to EU visitors or to everyone?

envintus

9:02 pm on Aug 16, 2015 (gmt 0)

10+ Year Member



@ember, nope, this shows for everyone -- there is no geo location built-in.

@everyone, I've updated the README with a description, installation instructions, and basic information on how to test.

Like I said before this is basic, but works and if anyone would like to contribute then please do so via Github. Also if there any issues could you please log them in GIthub as well?

ChanandlerBong

5:09 am on Aug 17, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



function setCookie(cookie, value, epxiration) {
var d = new Date();

d.setTime(d.getTime() + (epxiration*24*60*60*1000));


does that mean expiry isn't being set properly?

robzilla

8:51 am on Aug 17, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



"epxiration" is just a variable name. So long as it's misspelled everywhere, you should be fine, but you might as well correct it.

Badger37

3:50 pm on Aug 17, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



FWIW
Using Silktide's solution I've just found that old pages using QuirksMode or similar ancient DOCTYPEs don't play nicely for IE8 visitors!

FF/Chrome still display the banner - I'm hoping Google are happy with that as they are also dropping IE8 support on many if it's products...

Spent way too much time on Cookie Law for the return I get on my sites... :(

envintus

4:52 pm on Aug 17, 2015 (gmt 0)

10+ Year Member



Like I said I wrote this in a short amount of time. A user here on WebmasterWorld saw this thread and has since submitted a pull request on Github with some nice feature enhancements. I've since merged their changes and the latest version is now at 1.1: [github.com...]

The misspelled variable for expiration has also been fixed.

vordmeister

6:59 pm on Aug 17, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



What happened with IE8 @Badger37? Just no display or something more horrid? It does take a bit of time especially when you find sites you wrote 12 years ago that make no use of includes. I found it very much easier to remove Adsense from those sites rather than rewrite the architecture in a more sensible way.

Thanks for the update @envintus. Please keep updating us here - it is your very helpful code I have used (with a little mod to add path=/ to the cookie).

londrum

7:17 pm on Aug 17, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



yeah, thanks for the script. i think i'll probably end up using it to

Badger37

10:03 am on Aug 18, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



What happened with IE8 @Badger37? Just no display or something more horrid? It does take a bit of time especially when you find sites you wrote 12 years ago that make no use of includes. I found it very much easier to remove Adsense from those sites rather than rewrite the architecture in a more sensible way.


In IE8 my very old pages give a JS error for the cookie banner: "Object doesn't support this property or method". The original page still displays, just the required cookie notice doesn't make it...

There are going to be a LOT of old pages displaying AdSense out there that won't easily accept these modern type banners :(

I notice Cookiebot by Cybot (£3-£25 a month...!) which is another one linked to by Google's cookiechoices site, fails in IE8 with a JS error! - and that's on its own current website pages not old ancient one's I'm playing with. So I'm taking that as a good thing and Google won't worry about old browsers having issues displaying the warning. Not quite what the EU might be expecting though.

More worryingly Cybot have this on their website:
If you use any of Google's embedded services on your website, like AdSense, Analytics, Maps, YouTube and Tag Manager, you must obtain cookie consent from visitors before enabling the services.

If that proves to be the case then it will cause lots of problems.

Silktide seem to be keeping pretty quiet about the whole thing. I did eventually get a late response from their Twitter feed where I was asking if v2 of the script was compliant or if it had to be the more complicated v1. Not a straight answer though. "Might depend on your country" I said UK, but nothing back.

I wish Google would be more vocal on all of this! :(

londrum

3:08 pm on Aug 18, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How do you go about setting the path in the javascript cookie so it applies to the whole website rather than just a subdirectory? I am no good at javascript and the relevant line in the code builds the information in a way that is too clever for me.


this was happening to me as well, so i changed the line

document.cookie = cookie + "=" + value + "; " + expires;

to
document.cookie = cookie + "=" + value + "; " + expires + "; path=/";

dolcevita

8:35 am on Aug 19, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




More worryingly Cybot have this on their website:

If you use any of Google's embedded services on your website, like AdSense, Analytics, Maps, YouTube and Tag Manager, you must obtain cookie consent from visitors before enabling the services.

If that proves to be the case then it will cause lots of problems.


From [adexchanger.com...] :

A Google spokesperson said its policy does not specify if publishers need to obtain consent before dropping cookies.

bhukkel

8:47 am on Aug 19, 2015 (gmt 0)

10+ Year Member



I think there are two things

1 - being compliant with Google Adsense policy
2 - being compliant with EU Cookie law (in practice there are 25 cookie laws for every country one)

This thread is about being compliant with Google Adsense. So based on what i have read having a banner and some kind of cookie policy is enough for Google.

Being compliant for EU cookie law specially in countries like France, Germany and the Netherlands means placing no tracking/ad cookies before you have permission or implied consent. In practice it would be something like on first page view no tracking/ad cookies and on the second page view you can start placing all cookies.

robzilla

9:58 am on Aug 19, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Being compliant for EU cookie law specially in countries like France, Germany and the Netherlands means placing no tracking/ad cookies before you have permission or implied consent. In practice it would be something like on first page view no tracking/ad cookies and on the second page view you can start placing all cookies.

Or a cookie wall. That's what most larger sites in The Netherlands have opted for after being threatened with hefty fines.

dolcevita

10:20 am on Aug 19, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Or a cookie wall. That's what most larger sites in The Netherlands have opted for after being threatened with hefty fines.


I think that probably 75% website with .nl extension did not have implemented any cookie message at all. Second there is very large TV commercial site which do not use cookie wall (only warning in footer) and in the same time use Adsense without waiting on visitor consent.

[rtl.nl...]

And according to their cookie policy which is made working with OPTA (Autoriteit Consument & Mark) there is not any problem at all.
This 431 message thread spans 15 pages: 431