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.
This 431 message thread spans 22 pages: 431