Overview
Use GTM as the deployment layer, but do not let tags start before the user's choice. CookiePilot publishes consent updates to the dataLayer and GTM rules start vendors only after the right consent.
installation and tag orchestration.
cookiepilot_consent_update.
stub before other tags.
Consent behaviour
Preview shows the CookiePilot tag first.
Consent state starts as denied.
Vendors wait for the consent update.
Setup steps
Add the stub before GTM.
Add the CookiePilot tag on Consent Initialization.
Set required consent on vendor tags.
Example snippet
Example snippet
// GTM Custom Event name
cookiepilot_consent_update
// Example Custom JavaScript variable in GTM
function () {
var consent = window.cookiepilot_consent || {};
return consent.marketing === true;
}Test checklist
Preview shows the CookiePilot tag first.
Consent state starts as denied.
Vendors wait for the consent update.
Setup steps
- 1Add the stub before GTM.
- 2Add the CookiePilot tag on Consent Initialization.
- 3Set required consent on vendor tags.
Test checklist
- Preview shows the CookiePilot tag first.
- Consent state starts as denied.
- Vendors wait for the consent update.
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.
Related integrations
See the setups that most often appear together with this integration.
Ready to configure it?
Start CookiePilot, choose the right integration and verify that tags wait for user consent before they run.