Overview
The WordPress plugin connects the domain, edits the banner and enables Consent Mode without manual theme edits.
How the WordPress plugin works
The WordPress plugin is the installation layer for sites where the owner does not want to edit the theme manually. After the domain apiKey is saved, it loads CookiePilot configuration and renders the banner on the frontend.
The plugin editor mirrors the app configuration: presets, colors, texts, languages, Accept/Reject/Settings buttons and preview.
Necessary cookies vs consent-gated trackers
WordPress can use technical and preference cookies such as logged-in sessions, wp-settings-* and wp_lang. CookiePilot separates these from analytics and marketing trackers.
Testing should be done in a clean non-admin session so wp-admin cookies do not pollute the result.
Setup steps
- 1Install and activate the CookiePilot plugin.
- 2Paste the domain key from CookiePilot.
- 3Enable Consent Mode v2 and save the configuration.
- 4Open the frontend in a clean session and verify the banner before consent.
Test checklist
- window.CookiePilot is available on the frontend.
- Before consent there are no _ga, _fbp, _gcl or similar cookies.
- Reject keeps the site functional.
- Accept sends the consent update to dataLayer.
FAQ
Is this legal advice?
No. It is an implementation guide. For unusual data flows, confirm the setup with your legal or privacy team.
Does CookiePilot block every script automatically?
CookiePilot supports autoblocking and Consent Mode. Trackers hardcoded before the CMP still need to be moved behind the stub or into GTM Consent Initialization.