What the plugin does

Designed for WordPress sites.

No-code installation

Paste the server URL and the site ID, then test the connection: the banner appears at the top of every page, before any other script.

WordPress trackers blocked

Google Analytics (gtag), Meta Pixel, Hotjar, Microsoft Clarity, LinkedIn Insight and TikTok Pixel are held back until consent is given.

Videos on consent

Embedded YouTube and Vimeo videos are replaced by a placeholder until the visitor accepts the relevant category.

WP Consent API

The visitor’s choices are shared with compatible plugins, such as WooCommerce or Site Kit by Google.

Shortcodes

[optooki_preferences] displays a “Manage cookies” button, and [optooki_cookie_list] the table of cookies for your policy.

Privacy policy

A ready-to-use text is suggested under Settings → Privacy, for you to adapt to your site.

Installation

  1. Create your Optooki account, add your site and publish the banner.
  2. In WordPress, install and activate the Optooki plugin from Plugins → Add New Plugin.
  3. Open Settings → Optooki and enter the server URL and the site ID, shown in the “Installation” tab of your dashboard.
  4. Click “Test the connection”: the banner appears on your site.

With a caching or optimisation plugin

WP Rocket, Autoptimize, LiteSpeed Cache and similar plugins can defer or combine scripts. Exclude the Optooki script (it carries the data-optooki attribute) from the “defer”, “delay JavaScript execution” and “combine JavaScript files” options: it must remain the first script on the page to block trackers in time.

Blocking another script

Add its URL to the optooki_blocked_scripts filter:

add_filter( 'optooki_blocked_scripts', function ( $map ) {
  $map['cdn.example.com/tracker.js'] = 'analytics';
  return $map;
} );

The available categories are necessary, preferences, analytics and marketing.

The plugin’s admin interface is available in English and French. It requires WordPress 6.0 and PHP 7.4 or later.

Your banner, ready before your next coffee.

Create your account, customise the banner and add one line of code. Free for one site, no credit card required.