Contao

A single package for Contao 4.4 to 6. The module adds the banner to every page of the public site, cached pages included, without touching the templates.

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

  1. Install the package

    In the Contao Manager, Packages tab, upload optooki-contao.zip with 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
  2. 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).

    Contao settings, Optooki section and successful connection
  3. 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.

    The Optooki banner on a Contao site, with the button and the cookie list

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

Your cookie 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.