jQuery - EPD / PECR compliant jQuery plugin for Google Analytics

This jQuery plugin is the Wolf Software solution to the new cookie law that becomes law on 26 May 2011. The idea is to have a inobtrusive method of gaining user consent BEFORE using Google Analytics which requies cookies.

An amendment to the Privacy and Electronic Communications Act (PECR) is a change to legislation that comes into force in the UK on the 26th May 2011.

The code requests consent from the user if the user gives consent then the plugin will 'inject' the GA code into the page, if they do not give consent (or do not click yes or no), no code is injected.

The user also has the option to store these preferences permanantly, which will set a cookie, dealing with this, this again is 'optional' and as such is still complient with the law.

This class is designed to resolve the EPD / PECR regulations ONLY for google analytics and that is what we use at Wolf Software.

This plugin has been tested on the following browsers/platforms:

We have tried to test this plugin with as many OS and browser combinations as we can including mobile devices, and the general rule is if the browser can handle javascript then it should work. If the user has javascript disabled, then you simply get no tracking, it will NOT create cookies without their express consent via javascript.

Manual testing against latest available versions

The following screen readers have been tested:

We have not been able to sucessfully test this plugin with a screen reader, however we have successfully tested it using ClipSpeak.

We have also tested the code with 2 of the firefox plugins. SpeechUtil (0.3) and also Text To Voice (1.05) both of which work with this plugin.

Automated testing via http://browsershosts.org, as with any automated testing the results may contain false negatives, all positive results were manually verified.

Test Result
kazehakase 0.5.2 ubuntu 8.04 lts
firefox 3.0.3 ubuntu 8.04 lts
shiretoko 3.5 debian testing
konqueror 4.2 debian testing
opera 9.63 debian testing
seamonkey 2.0.13 arch
epiphany 2.22 ubuntu 8.04 lts
flock 2.6.2 arch
opera 10.60 debian testing
chrome 5.0.375.99 debian testing
firefox ubuntu 8.04 lts
galeon 2.0.4 ubuntu 8.04 lts
firefox 1.0.8 arch
opera 10.00 debian testing
firefox 4.0 arch
iceape 1.1.13 debian testing
iceweasel 3.0.4 debian testing
konqueror 3.5 debian testing
navigator arch
seamonkey 1.1.12 ubuntu 8.04 lts
firefox 3.6.16 arch
kazehakase 0.5.4 freebsd 7.1
iceweasel debian 4.0
minefield 3.7 debian testing
chrome 11.0.696.25 ubuntu 9.04
konqueror 4.5 ubuntu 9.04
opera 11.10 ubuntu 9.04
opera 11.01 debian unstable
iceweasel 3.5.18 debian unstable
konqueror 4.3 ubuntu 9.10
opera 11.01 ubuntu 9.10
firefox 3.5.8 ubuntu 9.10
konqueror 4.6 arch
chrome 9.0.597.94 arch
opera 11.00 debian testing
epiphany 2.30.2 ubuntu 9.04
seamonkey 1.1.14 windows xp
opera 9.63 windows xp
safari 533.3 arch
msie 7.0 windows xp
msie 8.0 windows xp
firefox 3.0.6 windows xp
firefox 3.5.6 windows xp
safari 4.0 windows xp
firefox 4.0 windows 2000
chrome 10.0.648.133 ubuntu 9.10
opera 11.10 windows xp
chrome 9.0.597.107 windows xp
chrome 10.0.648.204 windows xp
firefox 3.0.10 freebsd 7.1
safari 5.0.3 windows xp
flock 7.0.517.450 windows xp
navigator windows xp
seamonkey 2.0.13 windows xp
konqueror 3.5 freebsd 7.1
msie 6.0 windows xp
seamonkey 1.1.16 freebsd 7.1
firefox windows 2000
chrome windows xp
chrome windows xp
shiretoko 3.5 windows xp
chrome windows xp
opera 10.5 windows xp
opera 8.54 windows xp
netscape 8.1.3 windows xp
opera 10.63 windows xp
msie 9.0 windows vista
minefield 3.7 windows xp
firefox 3.6 windows xp
opera 11.1 windows xp
opera 9.27 windows xp
opera 9.50 windows xp
opera 7.54 windows xp
opera 9.51 windows xp
flock 2.6 windows xp
k meleon 1.5.0 windows xp
epiphany 2.22 freebsd 7.1
opera 9.52 windows xp
opera 9.80 windows xp
opera 9.60 windows xp
opera 9.61 windows xp
avant 11.7 windows xp
chrome 6.0.472.63 debian 4.0
opera 9.62 windows xp
opera 9.64 windows xp
opera 9.64 freebsd 7.0
chrome 11.0.696.65 windows vista