[{"data":1,"prerenderedAt":298},["ShallowReactive",2],{"rule-consent-cmp-not-on-init":3},{"id":4,"title":5,"body":6,"breadcrumb":261,"coderail":268,"dateModified":287,"datePublished":287,"description":288,"extension":289,"meta":290,"navigation":291,"next":287,"path":292,"prev":287,"schemaType":293,"seo":294,"stem":295,"wide":296,"__hash__":297},"docs\u002Frules\u002Fconsent-cmp-not-on-init.md","CMP not on Consent Initialization trigger",{"type":7,"value":8,"toc":251},"minimark",[9,16,54,59,86,90,96,100,123,127,155,159,223,227],[10,11,12],"p",{},[13,14,15],"strong",{},"Summary",[17,18,19,30,36,42,48],"ul",{},[20,21,22,25,26],"li",{},[13,23,24],{},"rule_id"," — ",[27,28,29],"code",{},"consent-cmp-not-on-init",[20,31,32,35],{},[13,33,34],{},"purpose"," — Detect CMP tags not firing on the Consent Initialization trigger inside GTM (Google Tag Manager)",[20,37,38,41],{},[13,39,40],{},"effect"," — Consent state may not be set before other tags evaluate, creating a timing gap",[20,43,44,47],{},[13,45,46],{},"layer"," — container",[20,49,50,53],{},[13,51,52],{},"reversibility"," — non-destructive",[55,56,58],"h2",{"id":57},"what-fires-this","What fires this",[10,60,61,62,65,66,69,70,73,74,77,78,81,82,85],{},"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. ",[27,63,64],{},"detectCMP()"," identifies the CMP tag; the rule then checks whether ",[27,67,68],{},"firingTriggerIds"," includes ",[27,71,72],{},"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 ",[27,75,76],{},"medium"," severity because they commonly initialize consent via an inline script in the page ",[27,79,80],{},"\u003Chead>"," before GTM loads. All other CMPs receive ",[27,83,84],{},"high"," severity. Paused tags are not evaluated.",[55,87,89],{"id":88},"why-it-matters","Why it matters",[10,91,92,93,95],{},"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 ",[27,94,80],{}," 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.",[55,97,99],{"id":98},"example","Before \u002F after",[101,102,103,114],"compare",{},[104,105,107],"compare-col",{"label":106},"Before — flagged",[10,108,109,110,113],{},"CMP tag \"OneTrust Consent\" fires on the ",[13,111,112],{},"All Pages"," trigger.\nGTM evaluates consent-dependent tags before OneTrust has a chance to set consent state.",[104,115,117],{"label":116},"After — fixed",[10,118,109,119,122],{},[13,120,121],{},"Consent Initialization - All Pages"," built-in trigger.\nConsent state is established before any other tags are evaluated.",[55,124,126],{"id":125},"remediation","Remediation",[128,129,130,136,139,142,145,152],"ol",{},[20,131,132,133,135],{},"Check your page source for a CMP initialization script in the ",[27,134,80],{}," element, placed before the GTM snippet. If present, consent is initialized outside GTM and this finding can be disregarded.",[20,137,138],{},"If the CMP loads only through the GTM tag, open the tag in GTM.",[20,140,141],{},"Remove the current trigger (All Pages or DOM Ready).",[20,143,144],{},"Add the \"Consent Initialization - All Pages\" built-in trigger.",[20,146,147,148,151],{},"Set ",[27,149,150],{},"waitForUpdate"," to an appropriate value (500–2000 ms) so consent-dependent tags wait for the CMP response.",[20,153,154],{},"Preview the container and confirm consent state is available before page-load tags fire.",[55,156,158],{"id":157},"metadata","Metadata",[160,161,164,165,170,164,173,177,164,180,184,164,187,190,164,193,197,164,200,204,164,210,213,164,216,220],"dl",{"className":162},[163],"spec-list","\n  ",[166,167,169],"dt",{"id":168},"severity","Severity",[171,172,84],"dd",{},[166,174,176],{"id":175},"tier","Tier",[171,178,179],{},"optimization",[166,181,183],{"id":182},"category","Category",[171,185,186],{},"consent",[166,188,189],{"id":46},"Layer",[171,191,192],{},"container",[166,194,196],{"id":195},"version","Version",[171,198,199],{},"1",[166,201,203],{"id":202},"effort","Effort",[171,205,206,209],{},[27,207,208],{},"15min"," (about 15 minutes)",[166,211,212],{"id":52},"Reversibility",[171,214,215],{},"non-destructive",[166,217,219],{"id":218},"regulatory","Regulatory",[171,221,222],{},"GDPR Art. 6 (lawful basis), GDPR Art. 7 (consent)",[55,224,226],{"id":225},"see-also","See also",[17,228,229,237,244],{},[20,230,231,236],{},[232,233,235],"a",{"href":234},"\u002Fcategories\u002Fconsent\u002F","Consent rules"," — other rules in this category",[20,238,239,243],{},[232,240,242],{"href":241},"\u002Fhealth-score\u002F","Health score"," — how this rule contributes to the score",[20,245,246,250],{},[232,247,249],{"href":248},"\u002Frules\u002F","Rules catalog"," — browse all rules",{"title":252,"searchDepth":253,"depth":253,"links":254},"",2,[255,256,257,258,259,260],{"id":57,"depth":253,"text":58},{"id":88,"depth":253,"text":89},{"id":98,"depth":253,"text":99},{"id":125,"depth":253,"text":126},{"id":157,"depth":253,"text":158},{"id":225,"depth":253,"text":226},[262,265,267],{"label":263,"href":264},"API Reference","\u002F",{"label":266,"href":248},"Rules",{"label":29},{"cards":269,"onpage":281},[270],{"title":271,"tabs":272},"Evaluate",[273,277],{"label":274,"language":275,"code":276},"cURL","bash","curl https:\u002F\u002Fdeveloper.tagmanifest.com\u002Fv1\u002Fevaluate-rule \\\n  -H \"Authorization: Bearer $TM_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"rule_id\":\"consent-cmp-not-on-init\",\"url\":\"https:\u002F\u002Fexample.com\"}'\n",{"label":278,"language":279,"code":280},"MCP","text","User: Run consent-cmp-not-on-init on https:\u002F\u002Fexample.com\n\n# Tool call\n{\n  \"tool\": \"evaluate_rule\",\n  \"arguments\": {\n    \"rule_id\": \"consent-cmp-not-on-init\",\n    \"url\": \"https:\u002F\u002Fexample.com\"\n  }\n}\n",[282,283,284,285,286],{"id":57,"label":58},{"id":88,"label":89},{"id":98,"label":99},{"id":125,"label":126},{"id":157,"label":158},null,"CMP tag is not configured to fire on the Consent Initialization trigger, causing a timing gap.","md",{},true,"\u002Frules\u002Fconsent-cmp-not-on-init","TechArticle",{"title":5,"description":288},"rules\u002Fconsent-cmp-not-on-init",false,"LO-MosB7hkAFQcPbDZbrEGXBc-2R-nxLLC7eD_1bwLI",1796069483248]