Cookie Notice Pro is a light-weight jQuery plugin, helps you to comply with GDPR.
Make your own cookie information popup in minutes. Highly customisable plugin width
different layouts and millions colors to choose from. The General Data Protection
Regulation (GDPR) applies to all websites with users from the EU. Build trust with your
website users while living up to current data protection legislation and avoid potential
non-compliance fines.
Features
Below are some features which make Cookie Notice Pro plugin standout when compared with other
plugins.
Why Purchare Cookie Notice Pro:
Millions colors to choose from
Responsive Design With Many Layout Options
Easy customization No Coding
Quick Support By Flerosoft
Simple & Rich Documentation
Free Future Updates
Functionalities
Cookie Notice Pro comes with many functionalities. Some of the them are listed below:
Consent Withdrawal
Supports Google Consent Mode v2
Light-weight
Dark/Light Mode Theme
Show OR Hide Elements
Options to opt in/out
Allow Necessary Cookies
Inject Scripts
Browser Support
Get Plugin
You can buy the source code of Cookie Notice Pro from Flerosoft
Changelog
v3.0.0 14th October, 2025
Major Update Added multi-language support with automatic browser language detection
New Features:
New Multi-language support for 5 European languages (English, French, German, Spanish, Italian)
New Automatic browser language detection
New Config option enableAutoLanguageDetection to enable/disable auto-detection
New Config option language to manually set language
New API method getLanguage() to get current active language
New API method getSupportedLanguages() to get list of supported languages
New Built-in translations system for all banner texts
Files edited:
/cookienoticepro.script.js Added translations object and language detection logic
v2.2.1 - 12th December, 2024
Added functionality of changing the position of minimized cookie icon. Added new config
variable minimizedIconDisplayPosition
Files edited:
/cookienoticepro.script.js Added new config variable
minimizedIconDisplayPositionNew to set
the
position of minimized cookie icon
/cookienoticepro.style.css Updated css for minimize icon as per new
introduced config
v2.1.1 - 7th November, 2024
Files edited: /cookienoticepro.script.js Added support for passing custom config
options during init() to customize Cookie Notice Pro settings
v2.0.1 - 10th March, 2024
Files edited: /cookienoticepro.script.js Fixed consent mode v2 event not firing
v2.0.0 - 4th March, 2024
Updated cookie names:
cnp_consentUpdated: Cookie to store
default consent (Accept/Reject)
cnp_prefsUpdated: Cookie to store
accepted preferences
cnp_gconsent_ad_prefsNew: Cookie
to store google consent mode v2 ad prefs
cnp_gconsent_analytics_storageNew:
Cookie to store google consent mode v2 analytics storage
Removed /es5 folder
Files edited: /cookienoticepro.script.js and
/cookienoticepro.style.css and /index.html
Added inbuilt support for Google Consent Mode v2 (Setup )
Added minimize support: post consent accept/reject banner will be minimized with a
floating cookie icon. User will be able to change preference by clicking on it. Can be
configured by editing config enableMinimize
Code cleanup and other minor fixes
v1.1.2
Date: 29 June, 2022
Files edited: /es5/cookienoticepro.script.js and
/es6/cookienoticepro.script.js
Popup not opening properly when using cookieNoticePro.reinit() fixed
Multiple events firing when using cookieNoticePro.reinit() fixed
Added new feature to by default keep all the cookie settings checkboxes checked or unchecked:
Config allCheckboxesChecked: true|false
v1.1.1
Date: 26 Jan, 2022
Files edited: /es5/cookienoticepro.script.js and
/es6/cookienoticepro.script.js
Added feature to hide or show cookie icon in popup consent
Config showCookieIcon: true|false
v1.0.1
Date: 21 May, 2021
Files edited: /es5/cookienoticepro.script.js and
/es6/cookienoticepro.script.js
Fixed popup banner showing even after accepting
Function updated: cookieExists
Removed the hardcoded privacy policy link and used the variable
moreInfoBtnLink to add link for privacy policy page or cookie policy page
v1.0.1
Date: 13 May, 2021
Initial Release
Installation
After downloading, extract it. The folder structure and details about each file is explained
below.
Warning
Some code snippets in the documentation might in ES6 syntax which does not works
in IE browser and other old browsers. Make sure you compile your code using
compilers like Babel or
webpack or gulp or any other JS compiler/bundler if
you want to support IE and other old browsers.
This file contains the javascript code. The plugin is written in ES6
i.e using arrow and other higher order javascript functions which works only
in modern browsers. Check ES6
browser support .
cookienoticepro.style.css
This file contains the stylesheet or CSS of plugin.
index.html
This file contains the sample init code which has to be placed in head of
every page.
Integrations
Tip
Internet Explorer does not support ECMAScript 2015 or ES6. Use Babel compiler to convert ECMAScript
2015+ or ES6 code into a backwards compatible version of JavaScript in current and
older browsers or environments.
How To Integrate:
The bare minimum for using Cookie Notice Pro on a web page is linking to the plugin
javascript and the styles.
Download the code and add the JS script and CSS styles.
If no config options are provided, the plugin will use the default settings.
Note
There is already initialization code in the index.html file.
Configuration
Cookie Notice Pro plugin is highly customisable. You can customise the position,
layout, add or remove elements, use dark or light mode, change the primary colors from
millions of available colors as per your needs and requirements.
You need to edit the values of config object present in
cookienoticepro.script.js file.
const config ={...............}
Theme & Colors
Change the color code as per need of your website. You can also choose between dark and light
mode. You will find the settings in config object.
const config ={
themeSettings:{
primaryColor:"#115cfa",// Primary Color of Popup Banner
darkColor:"#3b3e4a",// Dark Theme Color
lightColor:"#ffffff",// Light Theme Color
themeMode:"dark",// Theme Mode (light|dark)},..........}
Theme & Colors Configuration:
Option
Defult Value
Values
Description
primaryColor
#115cfa
Any hex/rgb/rgba color code
The accent color of plugin. You can change it to match the primary color of
your website.
darkColor
#3b3e4a
Any hex/rgb/rgba color code
The background color of dark theme.
lightColor
#ffffff
Any hex/rgb/rgba color code
The background color of light theme. Default is white.
themeMode
light
light | dark
Plugin theme mode dark or light
Language Settings New in v3.0
Cookie Notice Pro now supports multiple languages with automatic browser language detection. The plugin automatically detects the user's browser language and displays the cookie banner in their preferred language.
Supported languages include: English (en), French (fr), German (de), Spanish (es), and Italian (it).
const config ={
enableAutoLanguageDetection:true,// Enable/disable auto-detection of browser language
language:"en",// Default language ('en', 'fr', 'de', 'es', 'it') - Will be auto-detected if enableAutoLanguageDetection is true..........}
Language Configuration Options:
Option
Default Value
Values
Description
enableAutoLanguageDetection New
true
true | false
Enables or disables automatic browser language detection. When enabled, the plugin will automatically detect and use the user's browser language.
language New
en
en | fr | de | es | it
Sets the default language for the cookie banner. This language will be used when auto-detection is disabled or when the detected language is not supported. Available options: 'en' (English), 'fr' (French), 'de' (German), 'es' (Spanish), 'it' (Italian).
How It Works
When enableAutoLanguageDetection is set to true, the plugin detects the browser language from navigator.language and automatically displays the banner in that language. If the detected language is not supported, it falls back to English. If auto-detection is disabled, the banner will use the language specified in the language config option.
Example: Disable Auto-Detection and Set Spanish as Default
const config ={
enableAutoLanguageDetection:false,
language:"es",// Force Spanish language..........}
Checking Current Language:
You can check which language is currently being used with the getLanguage() API method:
console.log(cookieNoticePro.getLanguage());// Returns: "en", "fr", "de", "es", or "it"
Adding a New Language (e.g., Russian, Chinese, Japanese)
You can easily add support for additional languages by following these steps:
Extensible Design
The translation system is designed to be easily extensible. You can add as many languages as you need by following the same pattern!
Step 1: Add Translation Object
In cookienoticepro.script.js, locate the translations object (around line 28) and add your new language. Use the ISO 639-1 language code.
Example: Adding Russian (ru)
const translations ={
en:{/* English translations */},
fr:{/* French translations */},
de:{/* German translations */},
es:{/* Spanish translations */},
it:{/* Italian translations */},// NEW: Add Russian translations
ru:{
title:'Согласие на использование файлов cookie',
description:'Этот веб-сайт использует файлы cookie или аналогичные технологии для улучшения вашего опыта...',
acceptBtnLabel:'Принять',
declineInfoBtnLabel:'Отклонить',
moreInfoBtnLabel:'Политика конфиденциальности',
settingsBtnLabel:'Настроить',
cookieTypesTitle:'Выберите файлы cookie для принятия',
necessaryCookieTypeLabel:'Необходимые',
floatingIconTooltip:'Настроить мои предпочтения',
necessaryCookieTypeDesc:'Эти файлы cookie необходимы для работы веб-сайта...',
cookieTypes:{
preferences:{
type:'Предпочтения',
description:'Файлы cookie предпочтений позволяют веб-сайту...',},
marketing:{
type:'Маркетинг',
description:'Маркетинговые файлы cookie используются...',},
analytics:{
type:'Аналитика',
description:'Аналитические файлы cookie позволяют нам...',},},},}
Step 2: Update Supported Languages Array
Find the detectBrowserLanguage() function (around line 233) and add your language code to the supportedLanguages array:
// Force the new language to test
cookieNoticePro.init({
enableAutoLanguageDetection:false,
language:'ru',// Test Russian});// Check if it's supported
console.log(cookieNoticePro.getSupportedLanguages());// Output: ["en", "fr", "de", "es", "it", "ru"]
Translation Best Practices
Use professional translation services, not just machine translation
Ensure all text strings are translated (don't leave any in English)
Test with native speakers to verify cultural appropriateness
Keep the same tone and style across all languages
Using a Single Default Language for All Users
If you want to display the cookie banner in only one language for all users regardless of their browser settings, simply disable auto-detection and set your preferred language.
Configuration:
$(document).ready(function(){
cookieNoticePro.init({
enableAutoLanguageDetection:false,// Disable auto-detection
language:'en',// Force English for all users});});
Common Use Cases:
Scenario
Configuration
Result
Website only in English
enableAutoLanguageDetection: false language: 'en'
All users see English banner
French-only website
enableAutoLanguageDetection: false language: 'fr'
All users see French banner
Multi-language website
enableAutoLanguageDetection: true language: 'en'
Auto-detects user's language, falls back to English
Regional website (Spain)
enableAutoLanguageDetection: false language: 'es'
All users see Spanish banner
Example: Force German for All Users
// Force German language regardless of user's browser settings$(document).ready(function(){
cookieNoticePro.init({
enableAutoLanguageDetection:false,
language:'de'});});// Verify the active language
console.log(cookieNoticePro.getLanguage());// Always outputs: "de"
When to Use Single Language vs Auto-Detection
Use Single Language (auto-detection OFF) when:
Your website is available in only one language
You're targeting a specific region/country
You want consistent experience for all users
You have legal requirements for specific language
Use Auto-Detection (auto-detection ON) when:
Your website supports multiple languages
You have an international audience
You want to provide localized experience
Improving user experience is a priority
Toggle Visibility
You can hide or show elements based on you needs and requirements. You will find the settings
in config object. in cookienoticepro.script.js
const config ={
showSettingsBtn:true,// Hide or show the preference settings(true|false)
showCloseIcon:false,// Hide or show the popup close icon(true|false)
showDeclineBtn:true,// Hide or show the cookie decline button(true|false)..........}
Display or Hide Elements Settings:
Option
Defult Value
Values
Description
enableMinimize New
true
true | false
Enable minimized floating cookie icon to adjust preferences
showCookieIcon
true
true | false
Hide/Show Cookie icon in popup consent
showSettingsBtn
false
true | false
The gear icon which opens the cookie preferences selection menu checkbox
showCloseIcon
false
true | false
The close popup icon on upper left of the popup banner.
showDeclineBtn
false
true | false
Cookie reject or decline button.
allCheckboxesChecked
false
true | false
Cookie settings checkboxes checked or unchecked bydefault.
Position & Others
Settings related to banner position, width, expiry date of cookie and delay in showing popup
banner. You will find the settings in config object. in
cookienoticepro.script.js
const config ={
displayPosition:"left",// Where popup should appear(top|right|bottom|left)
fullWidth:true,// Full width popup works only when "displayPosition" is set to top/bottom
delay:2000,// After how much time should popup appear(2000 is equal to 2 seconds)
expires:365,// Expiry date of cookie(365 is equal to 365 days)
moreInfoBtnLink:"/privacy-policy/",// Learn more link(default: privacy policy page)..........}
The popup banner should be of full-width or not. Full width popup works only
when displayPosition is set to top or bottom.
delay
2000
Milliseconds
The delay time in milliseconds to show cookie banner. Note: (1sec =
1000ms)
expires
365
Number of Days
Expiry date of accepted cookie Note: 365 = 365 days
moreInfoBtnLink
/privacy_policy/
path/link
Link of privacy policy or cookie policy page
Textual Changes
Important Update (v3.0)
Starting with v3.0, all text content is now managed through the built-in translation system. The plugin automatically displays text in the user's browser language. To modify text for any language, you need to edit the translations object in cookienoticepro.script.js, not the config object. The old configuration properties like title, description, acceptBtnLabel, etc. have been removed from the config.
To customize text for a specific language, locate the translations object at the top of the cookienoticepro.script.js file and edit the values for your desired language.
Example: Customizing English translations
const translations ={
en:{
title:"Cookie Consent",// Title of popup banner
description:"We use cookies to make your experience better...",// Message
acceptBtnLabel:"Accept All",// Accept cookie button text
declineInfoBtnLabel:"Decline",// Decline cookie button text
moreInfoBtnLabel:"Privacy Policy",// More info link text
settingsBtnLabel:"Customize",// Text of settings button
cookieTypesTitle:"Select cookies to accept",// Title of cookie preference options
necessaryCookieTypeLabel:"Necessary",// Label text of Necessary cookie item
necessaryCookieTypeDesc:"These cookies are necessary for the website to function...",// Hover text of necessary cookies
floatingIconTooltip:"Adjust my preferences",// Tooltip text for floating icon
cookieTypes:{
preferences:{
type:"Preferences",
description:"Preference cookies enable a website to remember information..."},
marketing:{
type:"Marketing",
description:"Marketing cookies are used to track visitors..."},
analytics:{
type:"Analytics",
description:"Analytics cookies allow us to count visits..."},},},// Other languages (fr, de, es, it) follow the same structure...}
Text Modifications:
Option
Defult Value
Description
title
Cookie Consent
Title of popup bannner
description
We use cookies to make your experience better. By using and further
navigating this website you accept this.
Message or description
settingsBtnLabel
Customize
Text of settings button
acceptBtnLabel
Accept
Accept cookie button text
declineInfoBtnLabel
Decline
Decline cookie button text
moreInfoBtnLabel
Learn More
More info link text
cookieTypesTitle
Select cookies to accept
Title of cookie preference options
necessaryCookieTypeLabel
Necessary
Label text of Necessary cookie preference which shows up in cookie
preferences selection
necessaryCookieTypeDesc
These cookies are necessary for the website to function and cannot be
switched off in our systems.
Hover text of necessary cookies preference item which shows up in cookie
preferences selection
floatingIconTooltip New
Adjust my preferences
Tooltip of floating cookie icon (Minimized)
Cookie Preferences
This is the advanced feature of cookie consent plugin. You can show the checkboxes which will
allow the user to choose cookie types. Based on the selection, you can inject the necessary
scripts in the <head>...</head> of your document/index.html.
Note
Edit this settings only if you would like to show
CUSTOMIZE cookie preferences selection option in your cookie consent
banner. You can hide or show the settings icon by changing the value of
showSettingsBtn to true in config.
const config ={
cookieTypes:[// Cookie types, value and description (Cookie Preferences Selection){
type:"Preferences",
value:"preferences",
description:"Preference cookies enable a website to remember information that changes the way the website behaves or looks, like your preferred language or the region that you are in.",},{
type:"Marketing",
value:"marketing",
description:"Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.",},{
type:"Analytics",
value:"analytics",
description:"Analytics cookies allow us to count visits and traffic sources, so we can measure and improve the performance of our site. They help us know which pages are the most and least popular and see how visitors move around the site.",},]}
You can edit the text value of a particular preference item or you can also delete or add a
new preference item which will show in cookie preference selection menu.
Adding A New Preference Item:
To add a new item, just add one more object in cookieTypes array.
Example is given below:
const config ={
cookieTypes:[..........{
type:"Targeting",
value:"targeting",
description:"Targeting cookies are used to identify visitors between different websites, eg. content partners, banner networks. Those cookies may be used by companies to build a profile of visitor interests or show relevant ads on other websites.",},]..........}
Injecting Analytics or Other Scripts in <head>...</head>:
You can inject your tracking and other scripts which uses cookies in
<head>...</head> of your document depending on the preferences
selected by the user in customize settings menu.
Tip
This method is helpful if you are showing
CUSTOMIZE cookie preferences selection menu option in your cookie consent
banner. If you are not showing preferences selection menu, you can IGNORE
this.
<head>// Initialize Cookie Notice Pro$( document ).ready(function(){
cookieNoticePro.init();});// Inject scripts if user accepts cookie types he is okay with// IMPORTANT: Add this code only if you are showing customize preference menuvarinjectScripts=functioninjectScripts(){// Example: Google Analyticsif(cookieNoticePro.isPreferenceAccepted("analytics")===true){
console.log("Analytics Scripts Running....");}// Example: Google Adwords cookie, DoubleClick, Remarketing pixels, Social Media cookiesif(cookieNoticePro.isPreferenceAccepted("marketing")===true){
console.log("Marketing Scripts Running....");}// Example: Remember password, language, etcif(cookieNoticePro.isPreferenceAccepted("preferences")===true){
console.log("Preferences Scripts Running....");}}</head>
Danger
Make sure you edit/change values of cookie preferences items ONLY ONCE i.e
first time when making it live as it will be stored in the browsers of the users.
And changing the value again will make the retrival of old value set by user
impossible.
Callbacks
The config object in file cookienoticepro.script.js has two
callback functions.
onConsentAccept: Executes when cookie is accepted
onConsentReject: Executes when cookie is rejected
APIs
The API reference documentation provides detailed information for each of the methods
provided by the plugin.
cookieNoticePro.init()
cookieNoticePro.init();
It is used to initialize the plugin. Read more about initialization.
cookieNoticePro.isAccepted()
cookieNoticePro.isAccepted();
Check if the consent is provided or not. Returns true if accepted else returns
false.
Parameter : None
Returns : Boolean
Example:
>> cookieNoticePro.isAccepted();true
cookieNoticePro.getPreferences()
cookieNoticePro.getPreferences();
Returns array of preferences accepted by the user. This is helpful when you are showing
customize preferences options.
Check if particular preference item is accepted or not. This is helpful when you are showing
customize preferences options. It requires parameter CookieTypeValue. Read more about Preferences Menu.
This method is helpful if you are showing
CUSTOMIZE cookie preferences selection menu option in your cookie consent
banner. If you are not showing preferences selection menu, you can IGNORE
this.
cookieNoticePro.reinit()
cookieNoticePro.reinit();
It is used to re-initialize the plugin. It re-opens the popup banner with previously accepted
preferences. It can be used for withdrawal of a particular
type(analytics,marketing,etc) of consent or accepting a new preference item in menu.
Parameter : None
Returns : None
Tip
This method is helpful if you are showing
CUSTOMIZE cookie preferences selection menu option in your cookie consent
banner. If you are not showing preferences selection menu, you can IGNORE
this.
cookieNoticePro.getLanguage() New in v3.0
cookieNoticePro.getLanguage();
Returns the currently active language code being used by the cookie banner. This is useful for debugging or when you need to know which language is being displayed to the user.
Parameter : None
Returns : String (Language code)
Example:
>> cookieNoticePro.getLanguage();"en"// If user's browser is set to French and auto-detection is enabled>> cookieNoticePro.getLanguage();"fr"
Note
The returned language code will be one of: "en", "fr", "de", "es", or "it".
cookieNoticePro.getSupportedLanguages() New in v3.0
cookieNoticePro.getSupportedLanguages();
Returns an array of all supported language codes that the plugin can display. This is helpful if you want to programmatically check which languages are available.
Important links and other useful information which might be useful to make use of plugin
more effectively.
Cookie Law
Cookies are text files with small pieces of data — like a username and password — that are
used to identify your computer as you use a computer network. Specific cookies known as HTTP
cookies are used to identify specific users and improve your web browsing experience.
Data stored in a cookie is created by the server upon your connection. This data is labeled
with an ID unique to you and your computer.
When the cookie is exchanged between your computer and the network server, the server reads
the ID and knows what information to specifically serve to you.
List of commonly asked questions and answers related to the plugin setup, configuration,
and other important questions
Cookies
What is the EU cookie law?
The EU cookie law is, basically, all about what other people (i.e. websites, companies and
service providers) are allowed to do with your digital data, what they can do with and what
they can't do without your consent, for what purposes, and in what ways.
What are cookies?
Cookies are small pieces of data that are stored on your computer's browser. Think of the
data as a cookie crumb; just not nearly as tasty. Cookies store information which of course
means that the personal information of each and every website user can also be stored.
Important to keep in mind is that In order to use this information in your marketing
strategy, you have to collect cookie consent.
Do I need a cookie notice?
The General Data Protection Regulation (GDPR) applies to all websites with users from the EU.
What does GDPR say about cookies?
Under the GDPR, cookies that are not strictly necessary for the basic function of your
website must only be activated after your end-users have given their explicit consent to the
specific purpose of their operation and collection of personal data.
Plugin Related
What is Cookie Notice Pro?
Cookie Notice Pro is a light-weight jQuery plugin, helps you to comply with GDPR. Make your
own cookie information popup in minutes. Highly customisable plugin width different layouts
and millions colors to choose from.
How to make ES6 code work in IE and
other old browsers?
You can use bundlers like Webpack or Gulp to
compile your javascript code which will
support the IE browser and other old browser versions. You can simply also use online
compiler like Babeljs.io to convert your
ES6 code into old browsers/IE compatible code.
Can Cookie Notice Pro plugin be configured
to support Google Consent Mode v2?
Yes, Cookie Notice Pro can be configured to support Google Consent Mode v2. By utilizing the
plugin's customizable consent management features alongside Google's gtag consent configuration,
developers can ensure their websites comply with GDPR while still leveraging Google's analytics and
advertising services. This integration allows for dynamic consent updates based on user
preferences, ensuring a seamless and compliant user experience. For detailed instructions, refer to
the plugin's documentation and Google's developer guides.
Checkout Google Consent Mode v2 integration with Cookie Notice Pro
Does the Cookie Notice Pro plugin support
consent modification and withdrawal??
Yes, the Cookie Notice Pro plugin supports both consent modification and withdrawal, allowing users
to easily change their consent preferences at any time. This feature ensures that websites using
the plugin can fully comply with GDPR requirements for user consent management, providing a
transparent and user-friendly experience for managing privacy preferences.
Checkout reinit()