Compatibility: Contao 4.4 to 6
Free, included in every plan. Download optooki-contao.zip
Before you start
Create the site in the Optooki dashboard, set up the banner and publish it: the plugin shows the latest published version. The getting started guide covers it in five minutes.
Installation
-
Install the package
In the Contao Manager, Packages tab, upload
optooki-contao.zipwith the package upload button, apply the changes and let the database update (a column is added to website roots).With Composer: copy the archive into a folder of the project (for example
packages/), then:composer config repositories.optooki artifact packages composer require optooki/contao-optooki vendor/bin/contao-console contao:migrate -
Connect the site to Optooki
System → Settings, Cookie consent (Optooki) section (marker 2): paste the server URL and the site ID, found in the Installation tab of the Optooki dashboard, then save. Saving tests the connection and writes the result at the top of the page (marker 1).
-
Check on the site
Open your site in a private window: the banner appears. On this test page, a Text element also holds the
[optooki_preferences]button and the[optooki_cookie_list]table.
What the plugin does
- The banner first in the
<head>of every public page, before any other script, never in the administration. - Google Analytics, Meta, Hotjar, Microsoft Clarity, LinkedIn and TikTok held until consent, even when added by another extension or by the theme. Can be turned off.
- YouTube and Vimeo videos in your content replaced by a placeholder until consent.
Button and cookie list
Write [optooki_preferences] and [optooki_cookie_list] in a Text element. A Hyperlink element pointing to #optooki, or a Redirect page to that address in the footer menu, reopens the preferences.
Several websites in one installation
For a Contao serving several websites, each website root can have its own Optooki ID: Layout → Pages, edit the root, Cookie consent (Optooki) section. Empty, the ID from the settings applies.
Content security policy
If a website root enables Contao’s CSP (5.3 and later), add the Optooki server address to script-src and connect-src.
In the same section : Install
- Any website One line to paste at the top of every page, for a site without a CMS.
- WordPress Plugin for WordPress 6.0 and later, compatible with WP Consent API.
- PrestaShop Module for PrestaShop 1.7, 8 and 9.
- Magento Module for Magento Open Source and Adobe Commerce 2.4.
- Joomla System plugin for Joomla 4.4, 5 and 6.
- Drupal Module for Drupal 10.3 and later, and Drupal 11.
- Shopify App connected to Shopify’s Customer Privacy API.
- Wix App connected to Wix’s consent policy.
- Squarespace One line to paste into the site’s code injection.
- Webflow One line to paste into the site’s custom code.
- Google Tag Manager Consent Mode v2, the optooki_consent trigger and the Optooki tag template.