Configurable GDPR Cookie Consent Popup - jQuery popupConsent.js

Configurable GDPR Cookie Consent Popup - jQuery popupConsent.js
File Size: 17.5 KB
Views Total: 305
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

popupConsent.js is a jQuery plugin that allows your page and web app to comply with European Cookie Law and GDPR.

It displays a cookie consent popup on page load that informs users your site uses cookies and provides a cookie settings panel where users can select and accept certain cookies for activation.

How to use it:

1. Insert the jQuery popupConsent.js plugin's files into your document.

<link rel="stylesheet" href="popupConsent.css" />
<script src="/path/to/cdn/jquery.min.js"></script>
<script src="popupConsent.min.js"></script>

2. Config the GDPR & Cookie consent popup.

var cookieConsentOptions = {

    // Cookie consent text
    'textPopup': 'We use cookies/targeted advertising to ensure you have the best experience on our site. If you continue to use our site, we will assume that you agree to their use. For more information, please see our <a href="#">privacy policy</a>.',

    // Accept button
    'textButtonAccept' : 'Accept all',

    // Config button
    'textButtonConfigure' : 'Configuring choices',

    // Save button
    'textButtonSave' : 'Save choices',

    // Consent opt-in box 1
    'textAuthorization1': 'Allow access to geolocation data',
    // Cookie name 1
    'nameCookieAuthorization1': 'autoriseGeolocation',

    // Consent opt-in box 2
    'textAuthorization2': 'Allow personalised ads and content, ad measurement and audience analysis.',
    // Cookie name 2
    'nameCookieAuthorization2': 'targetedAdvertising',

    // Consent opt-in box 3
    'textAuthorization3': 'Storing and/or accessing information on a device',
    // Cookie name 3
    'nameCookieAuthorization3': 'cookieConsent'

3. Initialize the plugin and done.


This awesome jQuery plugin is developed by clement-gaudiniere. For more Advanced Usages, please check the demo page or visit the official website.