Caching Compatible Cookie Opt-In and JavaScript

Caching Compatible Cookie Opt-In and JavaScript | Matthias Wagner – FALKEmedia


This lightweight plugin closes the gap between the annoying need for a cookie-banner to opt-in to some scripts (third party tracking, …) and super fast websites enabled by server-side caching plugins like WP Fastest Cache, W3 Total Cache and so on.

It is very simple:
* A visitor makes his selection by clicking the buttons in the cookie banner (use all cookies or use only necessary cookies)
* The selection is stored in a cookie
* Now after every page load our JS checks the cookie and asynchronously fetches the allowed scripts depending on the users selection
* You can also place shortcodes with inline scripts and html in your content with the same functionality and inline-warnings if no optin was made
* You can also place a shortcode to show the visitor his decision and allow him to revoke that decision, which seems necessary if you want to be gdpr compliant with your cookie solution


1. Plugin Installation

  1. Upload plugin-folder to your “/wp-content/plugins/” directory.
  2. Activate the plugin through the Plugins-menu in WordPress.

2. Plugin Setup

Scripts-Tab: Fill in the scripts you would like to execute
Settings-Tab: Choose your custom wording and styling

Plugin author

Matthias Wagner – FALKEmedia

Plugin official website address
If you encounter problems in using the Caching Compatible Cookie Opt-In and JavaScript plugin, you can comment below, and I will try my best to help you solve the problem

Leave a Comment

Your email address will not be published.