Skip to content
Québec Studio

Craft CMS extension

Cookie Consent Kit

Cookie consent, done right: no third-party cookie before the visitor agrees, and pages that stay cached. Built for Quebec’s Law 25.

Craft CMS 5
v5.0.8
Craft CMS 6
v6.0.10
Editions
Lite (free), Pro
Also for
Statamic, Laravel

Privacy policy

The plugin links the banner to the site's privacy policy and renders the declared cookies inside it. It does not create or edit the policy.

Set per site, as a page of the site or a URL — see policySource, policyEntry, policyUrl. The URL accepts a $ENV_VAR.

  • The link is shown in the banner's message, labelled with policyLabel.
  • With neither a page nor a URL, the banner shows no link.
  • The manage panel does not show it.

The table lists the declared cookies of each visible category: name, provider, purpose, retention. To place it, see Templates.

Options

OptionDefaultWhat it does
classesthe inventoryFramework setclasses per element
headingLevel3heading level of a category name, 2 to 6
headingtruefalse leaves out the category title and description
categoryalla handle, or a list of handles

With heading: false, each table takes its accessible name from an aria-label.

Markers in content

In content passed through the marker filter, a marker is replaced by the table:

[cookie-table]
[cookie-table:statistics]
[cookie-table category="statistics"]
[cookie-table heading="false"]
[cookie-table category="marketing" level="2"]
AttributeValues
categorya handle
headingfalse
level2 to 6
  • Quotes are optional; curly quotes are accepted.
  • Unknown attributes are ignored.
  • Marker attributes win over the filter's options.
  • Content without a marker is returned unchanged.
  • Content that is not already HTML is escaped before the replacement.
  • Without the filter, the marker stays in the page as text.

Markup

<div class="qsm-ck-inventory">
    <section class="qsm-ck-inventory-category" data-category="statistics">
        <h3 class="qsm-ck-inventory-title" id="qsm-ck-inventory-statistics">Statistics</h3>
        <p class="qsm-ck-inventory-description">…</p>
        <table class="qsm-ck-inventory-table" aria-labelledby="qsm-ck-inventory-statistics">
            <thead><tr><th scope="col">Cookie</th>…</tr></thead>
            <tbody><tr><td><code>_ga</code></td>…</tr></tbody>
        </table>
    </section>
</div>

One table per category, with four columns: name, provider, purpose, retention. The markup ships no CSS; it takes the site's styles.

Classes

inventoryFrameworkClasses rendered
''the qsm-ck-* classes only
bootstrap, bulma, tailwindthat framework's set, for one version of it
custominventoryClasses, one entry per element

Elements: wrapper, section, heading, description, table, thead, tbody, tr, th, td. The classes option overrides any of them for one table.

What the policy has to cover

A visitor has to be able to find which cookies the site sets, what each is for, how long it lasts, and who sets it. The table covers that part.

The plugin does not cover purposes of processing, legal bases, retention of personal information, processors, transfers outside Quebec, individuals' rights or the privacy officer.

A Craft CMS extension that doesn’t exist yet?

If Craft CMS doesn’t do what you need yet, we can build it for you.

Let’s talk

We use cookies

This site uses cookies that are required for it to work. With your consent, we also use cookies to measure traffic. You can change your mind at any time. Privacy policy

Your cookie preferences

Always on

Required for the site to work and for form security. These cannot be turned off.

Necessary
Cookie Set by Purpose Retention
CraftSessionId This site Keeps your browsing session. Session
CRAFT_CSRF_TOKEN This site Protects forms against cross-site request forgery. Session
cookie_consent This site Remembers your cookie choices. 6 months

Help us understand how the site is used so we can improve it. Measured with Matomo.

Statistics
Cookie Set by Purpose Retention
_pk_id.* This site Recognizes the browser from one visit to the next, without identifying you. 13 months
_pk_ses.* This site Groups the pages viewed during a single visit. 30 minutes