Skip to main content
TagManifest /Docs Dashboard

CMP not on Consent Initialization trigger

CMP tag is not configured to fire on the Consent Initialization trigger, causing a timing gap.

On this page 6

Summary

  • rule_id — consent-cmp-not-on-init
  • purpose — Detect CMP tags not firing on the Consent Initialization trigger inside GTM (Google Tag Manager)
  • effect — Consent state may not be set before other tags evaluate, creating a timing gap
  • layer — container
  • reversibility — non-destructive

What fires this

The rule is suppressed on public-endpoint scans because the Consent Initialization built-in trigger ID is transformed during Google's compilation step. It runs only on container JSON exports. detectCMP() identifies the CMP tag; the rule then checks whether firingTriggerIds includes CONSENT_INIT_TRIGGER_ID. If that trigger ID is absent, the rule fires. Severity depends on the CMP type: well-known external platforms (OneTrust, Cookiebot, Cookiefirst, Usercentrics, Quantcast, and others) receive medium severity because they commonly initialize consent via an inline script in the page <head> before GTM loads. All other CMPs receive high severity. Paused tags are not evaluated.

Why it matters

GTM's Consent Initialization phase fires before any other tags. If the CMP tag fires on All Pages or DOM Ready instead, there is a window where consent-dependent tags are evaluated before consent state exists. Tags may fire without valid consent or block unnecessarily. For well-known CMPs that load via a <head> script, the GTM trigger is less critical — consent is already set before GTM starts. For custom CMPs that rely solely on the GTM tag, the Consent Initialization trigger is required. Regulatory: GDPR Art. 6, GDPR Art. 7.

Before / after

CMP tag "OneTrust Consent" fires on the All Pages trigger. GTM evaluates consent-dependent tags before OneTrust has a chance to set consent state.

CMP tag "OneTrust Consent" fires on the Consent Initialization - All Pages built-in trigger. Consent state is established before any other tags are evaluated.

Remediation

  1. Check your page source for a CMP initialization script in the <head> element, placed before the GTM snippet. If present, consent is initialized outside GTM and this finding can be disregarded.
  2. If the CMP loads only through the GTM tag, open the tag in GTM.
  3. Remove the current trigger (All Pages or DOM Ready).
  4. Add the "Consent Initialization - All Pages" built-in trigger.
  5. Set waitForUpdate to an appropriate value (500–2000 ms) so consent-dependent tags wait for the CMP response.
  6. Preview the container and confirm consent state is available before page-load tags fire.

Metadata

Severity
high
Tier
optimization
Category
consent
Layer
container
Version
1
Effort
15min (about 15 minutes)
Reversibility
non-destructive
Regulatory
GDPR Art. 6 (lawful basis), GDPR Art. 7 (consent)

See also

Examples

Evaluate
curl https://developer.tagmanifest.com/v1/evaluate-rule \
  -H "Authorization: Bearer $TM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rule_id":"consent-cmp-not-on-init","url":"https://example.com"}'