Cookies and consent
A cookie consent banner and the analytics that wait for it: Google Analytics 4, Tag Manager, Yandex Metrica, Matomo and the Meta pixel load only after consent to their category.
Features
- A consent banner with “Accept all”, “Necessary only” and “Customise” buttons; “Statistics” and “Marketing” categories.
- Connects Google Analytics 4, Google Tag Manager, Yandex Metrica, Matomo and the Meta pixel. Each loads only after consent to its category; Tag Manager receives marketing consent through Consent Mode.
- Plausible sets no cookies and loads right away.
- The banner appears only when an analytics service that needs consent is connected.
- Each ID is checked against its expected format; one that does not match is not used.
- A “Cookie settings” link in the footer lets visitors change their mind.
- The choice is stored in the nx_consent cookie for six months.
- A summary in the admin panel: what visitors chose over 30 days, day by day, and which analytics services are connected.
Configuration
Admin panel → Settings → Consent settings. “Consent banner” group:- Ask visitors for consent — on by default. When off, analytics load right away.
- Banner layout — a bar at the bottom, a box in the corner or a window in the middle.
- Privacy policy page and Banner text (empty — the built-in text in the visitor's language).
- Ask about marketing cookies — turns on automatically with the Meta pixel.
- Consent version — raise the number after adding an analytics service, and the banner will ask everyone again.
Permissions
- See the cookie consent summary — granted on installation to editors and administrators.
On the site
The banner is embedded in every page; there are no separate pages. The summary is in the admin panel, in the “Cookies & analytics” section of the “Promotion” group.Installation and removal
Installation creates the consent_stats table: day, choice and count. Removing the module with data deletes it.Left out on purpose
- A per-visitor consent log: only an anonymised daily summary is stored.
How to install
You already have it. Panel → Modules → enable.
Version history
1.0.0
- Cookie consent banner: a bar, a box or a window; “Statistics” and “Marketing” categories
- Google Analytics 4, Tag Manager with Consent Mode, Yandex Metrica, Matomo and the Meta pixel — only after consent to their category
- Plausible without asking: it sets no cookies
- The banner is shown only when there is something to ask about; analytics IDs are checked against their formats
- “Cookie settings” link in the footer and an anonymised daily summary of choices
- Later in this version: the figures at the top of the summary are gathered into one row
Questions and findings go to the forum: the Modules section