OK, I accept

This site uses cookies. By using this site, you acknowledge and accept this.

Your basket is empty
Login not logged in

Full Knowledgebase Listing

EU cookie law and compliance code

[#39] Last update 31 May 2012

From 26 May 2012, the new EU cookie law came into place. This requires that EU based web sites that plant cookies receive express consent from the user.

A basic compliance solution

We have put together a simple solution to comply that can be fitted to any web site. Once added, it displays a warning bar at the top of the screen until the 'close' button is pushed:

Step 1

Download the free zip file below:

Download Name
Format
Size
Link
zip Cookie compliance code v1.000 zip 35 KB


Step 2

Copy the CookieCompliance folder to the root of your site.

Step 3

For Kartris, the following code needs to be placed into your .master pages such as Template.master and HomePage.master (but not the Invoice.master). For CactuShop, the code will go into your skin template's template.htm.

Paste the following into the HEAD section (somewhere between the <HEAD> and </HEAD> tags):

<!--
    =====================================
    COOKIE WARNING CODE REFERENCES
    =====================================
    -->
		<script type="text/javascript" src="CookieCompliance/jquery.js"></script>
		<script type="text/javascript" src="CookieCompliance/cookie-compliance.js"></script>
		<link type="text/css" href="CookieCompliance/stylesheet.css" rel="stylesheet">
    <!--
    END
    =====================================
-->

Post the following section just under the <BODY> tag:

<!--
    =====================================
    COOKIE WARNING MESSAGE
    =====================================
    -->
		<div id="cookieMessageWrapper">
			<div id="cookieMessage">
				<a id="cookieClose" href="#">Close</a>
				<p><strong>This site uses cookies.</strong> You can read how we use them in our <a href="http://www.kartris.com">privacy policy</a>.</p>
			</div>
		</div>
    <!--
    END
    =====================================
-->

You can change the text of the message and the URL of your privacy policy page, in the above code, to suit your own site.

If your site doesn't use a central page template, but has individual pages, then you will need to add this code to all of them.

Problems

If your site uses friendly URLs, then you may find you need to add a forward slash (/) in front of the script and CSS refences:

<script type="text/javascript" src="/CookieCompliance/jquery.js"></script>
<script type="text/javascript" src="/CookieCompliance/cookie-compliance.js"></script>
<link type="text/css" href="/CookieCompliance/stylesheet.css" rel="stylesheet">

You may find if your site already uses jQuery, you can remove the link to jquery.js above.

To change the color or font, open up and edit the stylesheet.css file.

Powered by kartris