Cookie Jar Stack

You may also like…

Cookie Jar

Cookie Jar helps bring your website up to compliance with the EU Cookies Directive. The stack will display a customizable message to your visitors along with options to accept or decline the cookie functionality. Cookie Jar also ships with a full set of snippets so that you can implement it on a non-Stacks page as well. For more details read through the docs in the demo area.

image thumbnail
image thumbnail


This should go without saying… BUT I am not a lawyer. This means that I take no legal responsibility in your implementation of this product. By purchasing and using this product you take on full legal responsibility for its implementation on your website. I strongly suggest that you do your own research on the Cookies Directive and consult a professional in these matters for more advice. Now that is taken care of, let's get to the fun stuff…

The Cookies Directive

On 26 May 2011 the European Commission made the controversial Cookies Directive law. It applies to the UK and all european countries. It mandates that the use of cookies on european businesses' websites must be disclosed and explicit consent for their use be obtained from your users. The Information Commissioner's Office has given UK businesses 12 months in which to achieve compliance.

Many people think this is a big step backwards, some that the legislation is so unworkable it will 'have' to be amended, but, as it stands, UK business websites will be required to make this disclosure from 26 May 2012. Fines of up to £500,000 could apply where businesses aren't following the law.

Affected Cookies

Cookies can be used for all kinds of things on the web. However, the only cookies that are restricted with the Cookies Directive deal with storing and tracking user information. In the RapidWeaver world, for most projects, this really only means that the Analytics service is the only culprit that you need to target. However, it is possible that addons that collect user data may be storing that data within a cookie. If that is the case, then these cookies are also affected by the Cookies Directive.

Cookie Jar

I am sure that you saw the demo of Cookie Jar when you first loaded this page. It displays a disclaimer at the top or bottom of your website. The content of the disclaimer is completely customizable. I recommend that you customize this to fit your websites needs. You might also want to make sure that you have a privacy policy on your website and link to that as well. By default Cookie Jar uses default HTML style buttons. However, you can swap those out and use your favorite button stacks instead (such as Sweet Button).

After you add and configure Cookie Jar onto your webpage, you will still need to ensure that your Analytics will not run unless the user allows it. Cookie Jar ships with a bunch of snippets; one of which is a wrapper for the analytics code that you obtain from the service you are using such as Google or GoSquared. You will need to place your analytics code inside the provided wrapper before you paste it into RapidWeaver.

Cookie Jar will not be able to magically stop all cookies from being created from code that is in another developers addon or from code that you may have gotten from the internet. If you feel that a particular plugin is storing cookies that are affected by the Cookies Directive, I recommend that you contact that developer to ensure that their product does indeed comply.

For Developers

If your customers are using Cookie Jar, its really simple to get your addon compliant with the Cookies Directive. Cookie Jar uses the same strategy implemented by the open source project at When a user clicks on the acceptance button within Cookie Jar, a cookie named "cookiesDirective". If this cookie exists, then you are allowed to store user data within your cookies. However, if this cookie does not exist, then you have not been given permission to store user data.

If a user has Cookie Jar implemented on their webpage, I have provided a conveneient JavaScript method to help you read in the cookies. Below is some simple logic that you can use to check to see if the cookiesDirective cookie exists. Obviously feel free to use your own code as well.

if (cdReadCookie('cookiesDirective')) {
	// You are allowed to create sensitive cookies. 
	// Insert your cookie generating code here.
else {
	// You are not allowed to create sensitive cookies. 
	//Add logic here for what you will do without that data.