How to embed Cookie consent

Include this code to <head> tag

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> <script type="text/javascript" src="https://cookie.accesstrade.me/jquery.ihavecookies.js"></script> <link href="https://cookie.accesstrade.me/jquery.ihavecookies.red.css" rel="stylesheet"> <script type="text/javascript"> $(document).ready(function() { let options = {}; $('body').ihavecookies(options); }); </script>

If you don't see it then you've probably already accepted it. Click the button below to reopen it.

Options

There are a number of options available to help with customisation:

Option Default Value Description
title "Cookies & Privacy" A custom title for the popup
message "Cookies enable you to use shopping carts and to personalize your experience on our sites, tell us which parts of our websites people have visited, help us measure the effectiveness of ads and web searches, and give us insights into user behavior so we can improve our communications and products." Add your own cookie message here, if you prefer not to use the default one. HTML can be included within this message.
link "/privacy-policy" Link to your privacy policy for more information
delay 2000 Time before the popup is displayed after page load (in milliseconds)
expires 30 Days for the cookie to expire
onAccept function(){} Optional callback function when 'Accept' button is clicked
uncheckBoxes false Unchecks all checkboxes on page load that have class .ihavecookies applied to them. Set to true to turn this option on
moreInfoLabel 'More information' Label for link to privacy policy
acceptBtnLabel 'Accept All Cookies' Label for accept cookies button
advancedBtnLabel 'Customise Cookies' Label for customise cookies button
cookieTypesTitle 'Select cookies to accept' Title for customise cookies section
fixedCookieTypeLabel 'Necessary' Label for the "necessary" cookie type
fixedCookieTypeDesc 'These are cookies that are essential for the website to work correctly.' Description for the "necessary" cookie type
cookieTypes Array Array of cookie types for which to show checkboxes for - See code example below.

Examples

let options = { // Optional callback function when 'Accept' button is clicked onAccept: function() { // Do whatever you need to here... }, // Array of cookie types for which to show checkboxes. // - type: Type of cookie. This is also the label that is displayed. // - value: Value of the checkbox so it can be easily identified in // your application. // - description: Description for this cookie type. Displayed in // title attribute. cookieTypes: [ { type: 'Site Preferences', value: 'preferences', description: 'These are cookies that are related to your site preferences, e.g. remembering your username, site colours, etc.' }, { type: 'Analytics', value: 'analytics', description: 'Cookies related to site visits, browser types, etc.' }, { type: 'Marketing', value: 'marketing', description: 'Cookies related to marketing, e.g. newsletters, social media, etc' } ], };

Some example with color themes