WP WordPress Beginner

DataFirefly Cookie Consent — Complete Guide

Install and set up DataFirefly Cookie Consent 2.0: setup assistant, banner designer, services and prior blocking, Google Consent Mode v2, preferences and withdrawal, consent records, policy versions, scanner, developers, regulations and troubleshooting.

Updated Module version 2.0.0

Overview

DataFirefly Cookie Consent asks visitors for their consent before your site sets non-essential cookies or loads third-party services, keeps the proof of each choice and lets visitors change their mind at any time. Version 2.0 really holds back known trackers and embeds until the choice, writes the Google Consent Mode v2 signals before any Google tag, offers preferences per service, deletes cookies on withdrawal and adds a dashboard, a setup assistant, a visual designer and a scanner.

DataFirefly Cookie Consent – Cookie banner (box) with “Reject all” and “Accept all” side by side on a WooCommerce store
Cookie banner (box) with “Reject all” and “Accept all” side by side on a WooCommerce store
In short: install, follow Cookie Consent › Setup assistant (scan, purposes, look, pages), open your site in a private window, then check Services and cookies after a new scan.

Requirements

  • WordPress 6.4 or later (tested with 7.1), PHP 7.4 to 8.5.
  • WooCommerce optional (8.2 or later, tested with 11.2), HPOS and cart/checkout blocks supported.
  • Your measurement and advertising tags installed as usual (the plugin does not install Google Analytics or Tag Manager for you).

Installation and first setup

  1. In Plugins › Add New › Upload Plugin, upload df-cookie-consent-2.0.0.zip, then activate it.
  2. Open Cookie Consent › Setup assistant. Scan my site lists the services found on your main pages; keep the ones to show in the banner.
  3. Choose the purposes you really use (preferences and features, audience measurement, advertising and social media), the layout and colour, then your cookie policy and privacy policy pages.
  4. Click Finish and activate and open your site in a private window to see it as a new visitor.

No cookie policy page yet? Settings › Create a draft cookie policy page prepares one with the visitor’s choices and the table of your cookies.

Design the banner

Cookie Consent › Banner shows a live preview of your unsaved changes, on desktop or on mobile, for the banner or the preferences screen.

DataFirefly Cookie Consent – Visual banner designer with live preview and texts per language
Visual banner designer with live preview and texts per language
  • Layout: box in a corner, full-width bar (bottom or top) or centred modal.
  • Theme: light, dark or automatic; accent colour used by both choice buttons, with the text colour chosen automatically and a contrast of at least 4.5:1 required.
  • Choice buttons: filled or outlined, the same for “Accept all” and “Reject all” (recommended), or “Accept all” highlighted — “Reject all” then keeps the same size and place with a readable outline; data protection authorities assess this case by case, so have it validated by your legal adviser. Optional “Continue without accepting” link, which counts as a refusal.
  • Access after the choice: floating “Cookie preferences” button (recommended) or your own link or block.
  • Texts per language: one tab per language of your site. Leave a field empty to use the translated default text shown in grey; the default message lists the purposes you use.
DataFirefly Cookie Consent – Modal layout in dark theme with the “Continue without accepting” link
Modal layout in dark theme with the “Continue without accepting” link

What visitors see

The first layer explains why cookies are used, with links to your policies and “See our partners”. “Reject all” and “Accept all” sit side by side; “Customize” opens the preferences.

DataFirefly Cookie Consent – Cookie preferences by category and by service, with providers and cookie details
Cookie preferences by category and by service, with providers and cookie details

Preferences are grouped by category, with a switch per category and per service. Each service shows its provider, its privacy policy, what it does and its cookies with their duration. The visitor’s consent ID and the date of the choice are shown at the bottom, with a link to withdraw consent.

DataFirefly Cookie Consent – Cookie banner on a phone
Cookie banner on a phone
DataFirefly Cookie Consent – Cookie preferences on a phone, shown as a bottom sheet
Cookie preferences on a phone, shown as a bottom sheet

On phones, the banner adapts to the width of the screen and the preferences open as a bottom sheet. Buttons are at least 44 px high.

Services and prior blocking

Cookie Consent › Services and cookies lists the services shown to visitors, with their category and cookies.

DataFirefly Cookie Consent – Services and cookies: catalogue of known services and custom services
Services and cookies: catalogue of known services and custom services
  • Block every known tracker (on by default): the 42 services of the catalogue are held back until consent even if you have not listed them yet.
  • Embeds: YouTube, Vimeo, Google Maps, Spotify, SoundCloud, Calendly, X and Facebook/Instagram posts are replaced by a placeholder until the visitor allows them.
  • Add from the catalogue or create a custom service: name, provider, category, privacy policy, the text that identifies its tags (a domain or part of the script) and its cookies.
  • Change the category of a service if your use differs (for instance a Matomo configured according to the CNIL exemption).
DataFirefly Cookie Consent – YouTube video blocked until consent, with a placeholder offering to allow it
YouTube video blocked until consent, with a placeholder offering to allow it

Blocking works on the HTML of the page: tags written by your theme, by other plugins or by hand. Tags fired later by a tag manager, for instance inside a Google Tag Manager container, must use the consent settings of that tool. To mark one of your own tags, write <script type="text/plain" data-dfcc-service="google-analytics">…</script>; to never block a tag, add data-dfcc-ignore.

In Cookie Consent › Google and integrations:

DataFirefly Cookie Consent – Google Consent Mode v2: basic or advanced mode, Global Privacy Control, WP Consent API
Google Consent Mode v2: basic or advanced mode, Global Privacy Control, WP Consent API
  • The default state (everything “denied”, security_storage granted) is written right after <head>, before any Google tag, then the stored choice is applied before the tags run, and gtag('consent', 'update') is sent on each choice.
  • Signals: ad_storage, ad_user_data and ad_personalization follow “Advertising”, analytics_storage follows “Audience measurement”, functionality_storage and personalization_storage follow “Preferences”.
  • Basic mode (default): Google tags wait for consent like the other trackers. Advanced mode: they load with “denied” and send cookieless pings that Google uses for modelling — data are sent to Google before the choice, decide with your legal adviser.
  • Where the default is “denied”: everywhere (recommended) or only in the EEA, the UK and Switzerland. wait_for_update: 500 ms by default. ads_data_redaction on, url_passthrough off by default.
  • Google Tag Manager receives the dfcc_consent_default and dfcc_consent_update events with dfcc_categories.

To check: open the site in a private window, type dataLayer in the browser console — the first entry is consent default; choose, and a consent update entry appears.

Withdrawal and policy versions

Visitors can change or withdraw their choice at any time with the floating button, the Cookie preferences button block, the Manage my cookies shortcode or any link to #dfcc-preferences. When a service is refused or consent is withdrawn, its first-party cookies are deleted and the page reloads so that scripts already running stop. The choice is kept 182 days by default, then the banner is shown again.

When you add a service or a purpose, publish a new version in Cookie Consent › Policy versions, with a note of what changed, and choose to ask every visitor again. The history keeps each version, its date, its author and the services at that time.

Cookie Consent › Consent records (administrators only) lists each choice: date (UTC), event, choices per category and per service, policy version, language and integrity seal.

DataFirefly Cookie Consent – Consent records with integrity seal, export and history per consent ID
Consent records with integrity seal, export and history per consent ID
  • Filter by consent ID, event or period; export in CSV (UTF-8, semicolon) or JSON.
  • A visitor can read their consent ID in the preferences: search for it to show the history of their choices or to delete it on request.
  • The seal shows whether a record was changed after it was written. Records imported from 1.x have no seal.
  • In Settings: retention (13 months by default — no text sets this period, keep the records as long as you may need to prove a consent, and no longer), IP address (not recorded by default, truncated or keyed hash optional), browser (short summary by default), proxy (Cloudflare or trusted reverse proxy only if your site is really behind one).

Dashboard and scanner

The dashboard shows the choices per day, the share of “Accept all”, “Reject all” and customised choices, consent per category and per language, and the choices sent with Global Privacy Control. These counters contain no personal data and are kept after the records are purged.

DataFirefly Cookie Consent – Dashboard: acceptance, refusal and customisation rates by category and by language
Dashboard: acceptance, refusal and customisation rates by category and by language

The scanner loads your home page, shop, a product, the latest post and your cookie policy twice — as written and as a new visitor receives them — and shows, for each service found, whether it is held back. It also reports unknown third-party scripts, cookies seen in visitors’ browsers that no listed service explains, and another consent plugin left active. These checks describe the technical setup; they are not a legal opinion.

DataFirefly Cookie Consent – Scanner: services found on the site and check that each one waits for consent
Scanner: services found on the site and check that each one waits for consent

Languages

The interface and the banner are translated into English, French, Spanish, German, Portuguese, Italian, Polish and Dutch. With Polylang or WPML, the banner is printed in the language of the page, with the texts you wrote for that language or the translated defaults, and the cookie policy link points to the page in that language.

Updating from 1.0.x

  • Your visitors are not asked again because of the update: the consent cookie and the policy version are kept. Your settings, custom texts and records are kept too.
  • Known trackers are now really blocked until consent: run the scanner after the update and list your services.
  • Consent Mode stays in advanced mode as in 1.x; switch to basic mode to load nothing before consent.
  • Choices collected by 1.x were made while trackers were not blocked: publishing a new policy version asks everyone again.

For developers

  • JavaScript: dfcc.open(), dfcc.accept(), dfcc.reject(), dfcc.withdraw(), dfcc.getConsent(), dfcc.hasConsent('analytics'), dfcc.hasService('youtube'), dfcc.allowService('youtube'); event dfcc_consent_change on document.
  • Hooks: dfcc_service_catalog, dfcc_blockable_services, dfcc_blocker_applies, dfcc_rate_limit, dfcc_scan_pages, dfcc_after_consent_logged.
  • REST: POST /wp-json/dfcc/v1/consent (public, validated, rate limited), /scan, /stats, /receipt/{uid} (administrators).
  • WP Consent API: categories mapped to functional, preferences, statistics, statistics-anonymous and marketing, consent type “optin”.

Regulations

The Regulation screen of the plugin lists what it covers, partly covers and does not cover, with its sources (CNIL, EDPB, Google, IAB Europe), reviewed on 19 November 2026. In short: prior consent, refusal as easy as acceptance, choice per purpose, easy withdrawal and proof are covered; the IAB TCF and Google-certified CMP requirement for AdSense, Ad Manager and AdMob publishers is not; cookies of other domains cannot be deleted. The plugin gives you the technical means to collect valid consent; whether your site complies also depends on your texts, your partners and your tags. This is not legal advice.

Troubleshooting

  • A tracker still runs before consent: run the scanner; if the service is not recognised, declare it as a custom service with a part of its script or its domain.
  • A tag fired by Google Tag Manager runs before consent: use the built-in consent checks of GTM for that tag; the plugin cannot see tags injected later by the container.
  • A form stops working: some anti-spam tools (reCAPTCHA) are not blocked automatically; if you block one, check your forms.
  • The banner does not appear: check that it is enabled, and that an optimisation plugin does not delay or combine the scripts dfcc-head and dfcc-banner (WP Rocket, LiteSpeed, Autoptimize, Perfmatters and SiteGround Optimizer are told to leave them untouched).
  • The scan fails: your server must be able to load its own pages (loopback requests).
  • Many visitors share one address (company network): raise the dfcc_rate_limit filter (60 choices per address per 10 minutes by default).
Was this page helpful?

Still stuck? Contact support