Cookie consent for developers

Cookie consent for developers

Wordpress plugin

Install on Wordpress

App Details

This plugin is intended primarily for developers, although any WordPress user with knowledge of HTML and JavaScript can use it. The plugin implements the logic of dealing with cookies as required by EU regulation and explained here. There is also This European Union page and this European Comission page which explain basic things about cookies and legislation which regulates their usage.

Multilingual capabilities, compatible with each and every multilingual plugin. Simply wrap messages in language tags (check lang attribute of html tag, however, use _ instead of -). For example, Italian language sentence should be: [it_IT]Il nostro sito web utilizza cookie per garantire…[/it_IT] The language shortcodes have the same syntax like regular WordPress shortcodes, each opening tag with language attribute inside should have a closing tag. >ou can put language tags in first four upper fields of plugin regarding texts and page ID. Other fields do not accept language shortcodes.

Javascript event cookiesAnswered fires on document object when cookie status is resolved, either on pressing ‘Accept’ or ‘Decline’ button.

The plugin is also updated to use SameSite cookie directive with default setting SameSite=Lax.

With proper use, you can make your website GDPR and PECR compliant. The basic principles are that user must be clearly informed about cookies that you use on a webpage (even from external services – web pages), and that user should be given a choice to decide if he wants to accept these cookies. The exception are cookies that do not identify computer (without unique identificator) and which are necessary for proper page functioning, like remembering shopping basket in an online store.

Why should I use this particular plugin?

Because it is free from bloatware, no additional CSS, JavaScript or other files are used in frontend. It offers smooth integration with minimal footprint; all code and HTML is placed inline in HTML of the page.

Plugin is particularly crafted to not allow any unwanted cookie placement before user consents, you control that by placing proper code in designated form fields in background.

The stress of the plugin is on simplicity, which also gives developers open hands to do customizations as preferred and needed. It is made to be cache – friendly; it means that it offers the same version of the page each time, no matter if user chose to opt-out of cookie usage, accepted cookies or has not yet decided. Plugin has been tested on “Cache Enabler” plugin, but it should work with other caching plugins and technologies as well. Only exception is YouTube videos which URL’s are replaced in situ in the backend, effectively making it a little different page for the caching plugin. However, this is necessary, since this YouTube code should not place any cookies if user has decided to opt-out, therefore URL exchange could not be done after the page loads.

How to use

There is a setup page titled “Cookie consent for developers” on admin panel in standard menu item ‘Settings’. It is important to understand how plugin works, and that you should divide JavaScript that places cookies into “working horse” part, which places cookies and does other things and part which starts that “working horse”.

On the plugin settings page, you should give short information about cookies or other similar technologies (from now on I will refer simple as “cookies”, although that also refers to local storage, session storage, …) used and ID of the page which tells user more about use of such technologies. This info shows as info window and is customizable via CSS. Two examples, css_example1.css and css_example2.css are given to show different styling of this info window (or ribbon). The “learn more” page (whose ID is given) should also provide mechanism to choose between allowing only necessary cookies or allowing all cookies. More about this page later.

Then you have to enter code in the header and footer, which places cookies and the code that calls that code, separately. In this way, the code that places cookies is executed only when user allows.

Finally, you can enter opt-out code, which will block functions which place cookies if user decides not to use them.

There is also possibility to enter custom code which will run on window load event (when page fully loads) which you can use to add special effects to info window or anything else you wish.

Learn more page

On learn more page (you have to build it yourself) you should explain about the cookies and their usage in simple and understandable way to general public. The information about all cookies on your web and their purpose should be given (including third-party).

Important: Two buttons (or links) should also be given on this page, with id’s: btnAcceptCookies and btnRefuseCookies (without apostrophes). These buttons shall be used to enable user to choose if cookies will be used or not (except necessary ones).

Styling

You can use two provided styles, or (very likely) do your own styling. If you choose option “Not used” in the settings, you should put custom CSS in theme or other styling CSS file, while if you choose “Custom CSS file”, you should provide separate CSS file.

This separate CSS file should be named ccfd_custom.css and should be placed in the root of your theme directory, or you can use filter named ccfd_custom_css_name to provide custom string for your CSS file. The same full path, like for wp_enqueue_style should be given.

Live examples of two given styles you can see on pages Učiliste Altius or Blog školskog muzeja.

Ideally, you should put styling in your main theme stylesheet, or however you find more appropriate.

YouTube

The plugin has special function for YouTube. If user decides to opt-out from cookies, all YouTube URL-s will be replaced with youtube-nocookie versions. This will also work for shortened URL’s like https://youtu.be. In this way, YouTube videos will still function, but they will not use cookies.

Languages

English and Croatian so far.

Warning

This plugin enables entering of javascript for admin users. Do not install it if you do not trust your admins, because malicious code can be entered by them.
However, many plugins and even WordPress itself has access to development scripts, be it PHP or javascript, so this is nothing extraordinary.

Pricing

Starting from $0 per month.

Check Out the Company Branch List Widget

By Common Ninja

Company Branch ListTry For Free!

App Info

Rating

Reviewers

1 reviews

Tags

cookie
cookie law
eu cookie law
GDPR
PECR

Developed By

Lovro Hrust

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Maps

Maps plugins for Wordpress

Translation

Translation plugins for Wordpress

Chat

Chat plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Contact

Contact plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Forms

Forms plugins for Wordpress

Comments

Comments plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Comments

Comments plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Video Player

Video Player plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Security

Security plugins for Wordpress

Ads

Ads plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Membership

Membership plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Company Branch List for Wordpress logo

Company Branch List

Present all your locations with a clear company branch list that helps customers find nearby offices, understand key details, and enjoy a smoother experience.

Sitejabber Reviews for Wordpress logo

Sitejabber Reviews

Show Sitejabber reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions that support higher sales.

Telegram Chat for Wordpress logo

Telegram Chat

Add Telegram Chat to your site to communicate with visitors, deliver instant support, and provide a smoother, more reliable user experience.

Vimeo Feed for Wordpress logo

Vimeo Feed

Show Vimeo videos in a Vimeo feed that keeps content fresh and helps visitors discover more of your video library.

Image Carousel for Wordpress logo

Image Carousel

Showcase images with an image carousel that rotates or slides visuals, improves design, and draws attention to key content.

Skill Flip Cards for Wordpress logo

Skill Flip Cards

Use skill flip cards to showcase your abilities in a clear, interactive format that strengthens your profile and improves your chances of getting hired.

Tabs for Wordpress logo

Tabs

Use tabs to organize content into clear sections, improve navigation, and help visitors switch between topics quickly for a smoother user experience.

Before & After Slider for Wordpress logo

Before & After Slider

Add an interactive before and after slider to your site to show visual transformations, capture attention, and help visitors understand real results.

Petition Form for Wordpress logo

Petition Form

Gather supporter signatures with a petition form that collects entries, saves submissions, sends notifications, and helps you drive meaningful change efficiently.

Process for Wordpress logo

Process

Use a process widget to present tasks in a clear visual sequence, showing each step with images and text to improve understanding and user engagement.

Course Registration Form for Wordpress logo

Course Registration Form

Use a scroll progress bar that visually tracks reading on the page, improves navigation, and keeps visitors aware of their position.

Social Media & RSS Feeds for Wordpress logo

Social Media & RSS Feeds

Add social media and RSS feeds to your site to display fresh content, grow your online presence, and keep visitors engaged with real time updates.

More plugins

plugins You Might Like

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms