Many Pies

Many Pies

Wednesday, April 25, 2012

Getting rid of cookies on our website - Wordpress, YouTube, AddThis, Google maps

The deadline for complying with the EU Cookie law is 26 May, which is just over a month away.

Rather than get permission to use cookies on our website which would either be intrusive or ignored we've decided to not use cookies. Here's what I've found as I work through the various things that use cookies.

Wordpress Comments

The built in wordpress comments feature sets cookies so that it can remember the commenters details for next time. I commented out (no pun intended) these three lines in wp-comments-post.php. (If you upgrade and this file gets changed you'll have to repeat this.)
// setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
// setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
// setcookie('comment_author_url_' . COOKIEHASH, esc_url($comment->comment_author_url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);

Wordpress Jetpack Stats

The Wordpress jetpack plugin uses quantcast cookies (HT A. Cemal Eki). The wp-donnottrack plugin will stop this.

YouTube

When you get the YouTube embed code you can now tick the "low privacy" option. All this does is use the youtube-nocookie.com domain, so you could use that on existing iframe embed code. The SmartYoutube Wordpress plugin allows you to set an option so that this happens on all your embedded videos.

Addthis.com

For the addthis wordpress plugin go to the Advanced tab and put
{ data_use_cookies: false };
in the addthis_config values field. For an embedded button use this code:

<script type="text/javascript">
var addthis_config = { data_use_cookies: false };
</script>

This won't stop individual services, like twitter, using their own cookies, but it will stop the addthis.com cookies.

Google maps

For google maps use maps.googleapis.com rather than maps.google.com. HT barryhunter.

4 comments:

Carl J Lenton said...

Hey Paul,

Great post, something to bear in mind when I do my cookie audit next week. What are you going to do about analytical tracking?

Paul Morriss said...

We're dropping it, and relying on server logs. I've discovered another analytics company that allows you to turn off their cookies, but I need to investigate more. (The free version is 1 site only.)

Unknown said...

I consider analytics to be an essential cookie required for the function of the site. This can be argued of course, but we need it in order to provide the best products and services and ensure the site performs well. Without analytics our site over time would not be competitive, fail to provide the best features, products and services.

Besides, I would say Google would not want to lose 90% of Europe's statistics so would guess they will come up with a solution too.

Also the ICO will only take action once complaints are received and the UK government have confirmed many of its own sits wont be compliant by that date anyway. And sites need to show they are working towards it if the ICO do take action to be let off. So all in all I think it may be OK.

Paul Morriss said...

I think the "essential" means it's essential for the user, not for you. I would have thought Google would have come up with a solution by now, but they don't seem to have done anything.

It will be interesting to see who they go after first, and what action they take.