Press "Enter" to skip to content

View Cookie Consent Form And Add The Google Analytics Tag | cookieKit

CookieKit jQuery plugin to display a consent form for cookies and for a Google Analytics extension that displays a GDPR and cookie consent form when users first visit your site and dynamically insert the Google Analytics tag into the document when they accept the data collection policy.

How to make use of it:

1. Load the jquery.cookiekit.js JavaScript library after jQuery.

<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/jquery.cookiekit.js"></script>

2. Initialize the CookiePackage and insert your individual Google Analytics Tracking ID.

$(document).cookieKit({
  id:'UA-XXXXXXXX-1'
});

3. Change the language of the GDPR and Cookie Consent Modal.

$(document).cookieKit({
  id:'UA-XXXXXXXX-1',
  lang: 'en'
});

4. Customize the looks of the GDPR and Cookie Consent Modal.

$(document).cookieKit({
  modal: {
    hrColor: '#b3b3b3',
    fontColor: '#3c3c3c',
    backgroundColor: '#e9e9e9'
  },
  button: {
    acceptColor: '#0a9919',
    acceptColorHover: '#076212',
    refuseColor: '#8a0a0a',
    refuseColorHover: '#550505',
  },
});

5. Assign a novel ID to the modal.

$(document).cookieKit({
  id:'UA-XXXXXXXX-1',
  id: 'myID'
});

6. Set the cookie to name, path, and expiration date.

$(document).cookieKit({
  id:'UA-XXXXXXXX-1',
  cookie: {
    name: 'cookiekit',
    days: 10,
    path: '/'
  },
});

GDPR and Cookie Consent Modal for Google Analytics, jQuery cookieKit Plugin/Github, gdpr cookie consent javascript, cookie consent popup javascript, cookie popup jquery example, gdpr cookie consent jquery, jquery cookie consent, bootstrap gdpr popup, bootstrap cookie consent, gdpr cookie consent github


See Demo And Download

Official Website(avantage-digital): Click Here

This superior jQuery/javascript plugin is developed by avantage-digital. For extra Advanced Usages, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *