[{"data":1,"prerenderedAt":421},["ShallowReactive",2],{"rule-consent-cmp-wait-for-update":3},{"id":4,"title":5,"body":6,"breadcrumb":384,"coderail":391,"dateModified":410,"datePublished":410,"description":411,"extension":412,"meta":413,"navigation":414,"next":410,"path":415,"prev":410,"schemaType":416,"seo":417,"stem":418,"wide":419,"__hash__":420},"docs\u002Frules\u002Fconsent-cmp-wait-for-update.md","CMP waitForUpdate is 0 or missing",{"type":7,"value":8,"toc":376},"minimark",[9,16,58,63,81,85,90,94,236,240,275,279,344,348,372],[10,11,12],"p",{},[13,14,15],"strong",{},"Summary",[17,18,19,30,40,46,52],"ul",{},[20,21,22,25,26],"li",{},[13,23,24],{},"rule_id"," — ",[27,28,29],"code",{},"consent-cmp-wait-for-update",[20,31,32,35,36,39],{},[13,33,34],{},"purpose"," — Detect CMP tags where ",[27,37,38],{},"waitForUpdate"," is 0 or absent, leaving consent-dependent tags without a timing buffer",[20,41,42,45],{},[13,43,44],{},"effect"," — Tags fire before the CMP resolves consent, or are blocked permanently on first load",[20,47,48,51],{},[13,49,50],{},"layer"," — container",[20,53,54,57],{},[13,55,56],{},"reversibility"," — non-destructive",[59,60,62],"h2",{"id":61},"what-fires-this","What fires this",[10,64,65,66,69,70,73,74,77,78,80],{},"The rule is suppressed on public-endpoint scans because public gtm.js compilation transforms tag parameter structures. It evaluates only on JSON container exports. When a CMP tag is detected via ",[27,67,68],{},"detectCMP()",", the rule reads ",[27,71,72],{},"rawTag.parameters.waitForUpdate"," and parses it as an integer. If the value is ",[27,75,76],{},"0"," or the parameter is absent, the rule fires. A value greater than 0 exits cleanly. For well-known external CMPs — OneTrust, Cookiebot, Usercentrics, and similar — that commonly initialize consent via inline scripts before GTM loads, the rule issues a low-severity finding with softened language. The rationale: if consent defaults are already set when GTM starts, ",[27,79,38],{}," on the GTM tag is not needed.",[59,82,84],{"id":83},"why-it-matters","Why it matters",[10,86,87,89],{},[27,88,38],{}," tells GTM (Google Tag Manager) how many milliseconds to hold consent-dependent tags before treating the consent state as final. Without this delay — or with it set to 0 — GTM evaluates tag consent immediately on Consent Initialization, before the CMP script loads and signals the user's choice. Tags then either fire without consent (if the default is \"granted\") or are blocked permanently on the first load (if the default is \"denied\"). A value of 500–2000ms gives typical CMP scripts time to load and signal consent. Regulatory: GDPR Art. 6 (lawful basis), GDPR Art. 7 (consent).",[59,91,93],{"id":92},"example","Before \u002F after",[95,96,97,181],"compare",{},[98,99,101],"compare-col",{"label":100},"Before — flagged",[102,103,108],"pre",{"className":104,"code":105,"language":106,"meta":107,"style":107},"language-json shiki shiki-themes github-light github-dark","{\n  \"name\": \"OneTrust Consent\",\n  \"type\": \"consent_init\",\n  \"parameters\": {\n    \"waitForUpdate\": 0\n  }\n}\n","json","",[27,109,110,119,136,149,158,169,175],{"__ignoreMap":107},[111,112,115],"span",{"class":113,"line":114},"line",1,[111,116,118],{"class":117},"sVt8B","{\n",[111,120,122,126,129,133],{"class":113,"line":121},2,[111,123,125],{"class":124},"sj4cs","  \"name\"",[111,127,128],{"class":117},": ",[111,130,132],{"class":131},"sZZnC","\"OneTrust Consent\"",[111,134,135],{"class":117},",\n",[111,137,139,142,144,147],{"class":113,"line":138},3,[111,140,141],{"class":124},"  \"type\"",[111,143,128],{"class":117},[111,145,146],{"class":131},"\"consent_init\"",[111,148,135],{"class":117},[111,150,152,155],{"class":113,"line":151},4,[111,153,154],{"class":124},"  \"parameters\"",[111,156,157],{"class":117},": {\n",[111,159,161,164,166],{"class":113,"line":160},5,[111,162,163],{"class":124},"    \"waitForUpdate\"",[111,165,128],{"class":117},[111,167,168],{"class":124},"0\n",[111,170,172],{"class":113,"line":171},6,[111,173,174],{"class":117},"  }\n",[111,176,178],{"class":113,"line":177},7,[111,179,180],{"class":117},"}\n",[98,182,184],{"label":183},"After — fixed",[102,185,187],{"className":104,"code":186,"language":106,"meta":107,"style":107},"{\n  \"name\": \"OneTrust Consent\",\n  \"type\": \"consent_init\",\n  \"parameters\": {\n    \"waitForUpdate\": 500\n  }\n}\n",[27,188,189,193,203,213,219,228,232],{"__ignoreMap":107},[111,190,191],{"class":113,"line":114},[111,192,118],{"class":117},[111,194,195,197,199,201],{"class":113,"line":121},[111,196,125],{"class":124},[111,198,128],{"class":117},[111,200,132],{"class":131},[111,202,135],{"class":117},[111,204,205,207,209,211],{"class":113,"line":138},[111,206,141],{"class":124},[111,208,128],{"class":117},[111,210,146],{"class":131},[111,212,135],{"class":117},[111,214,215,217],{"class":113,"line":151},[111,216,154],{"class":124},[111,218,157],{"class":117},[111,220,221,223,225],{"class":113,"line":160},[111,222,163],{"class":124},[111,224,128],{"class":117},[111,226,227],{"class":124},"500\n",[111,229,230],{"class":113,"line":171},[111,231,174],{"class":117},[111,233,234],{"class":113,"line":177},[111,235,180],{"class":117},[59,237,239],{"id":238},"remediation","Remediation",[241,242,243,253,256,262,272],"ol",{},[20,244,245,246,249,250,252],{},"Check whether your CMP loads via an inline script in the page ",[27,247,248],{},"\u003Chead>"," before the GTM snippet. If so, consent is already available when GTM starts and ",[27,251,38],{}," may not be needed.",[20,254,255],{},"If the CMP loads only through the GTM tag, open the CMP tag's Consent Initialization settings in GTM.",[20,257,258,259,261],{},"Set ",[27,260,38],{}," to a value between 500 and 2000 milliseconds.",[20,263,264,265,268,269,271],{},"Confirm the CMP calls ",[27,266,267],{},"gtag('consent', 'update', {...})"," within the ",[27,270,38],{}," window.",[20,273,274],{},"Test in GTM Preview mode and verify the consent update fires before other consent-dependent tags.",[59,276,278],{"id":277},"metadata","Metadata",[280,281,284,285,290,284,294,298,284,301,305,284,308,311,284,314,318,284,321,325,284,331,334,284,337,341],"dl",{"className":282},[283],"spec-list","\n  ",[286,287,289],"dt",{"id":288},"severity","Severity",[291,292,293],"dd",{},"critical",[286,295,297],{"id":296},"tier","Tier",[291,299,300],{},"optimization",[286,302,304],{"id":303},"category","Category",[291,306,307],{},"consent",[286,309,310],{"id":50},"Layer",[291,312,313],{},"container",[286,315,317],{"id":316},"version","Version",[291,319,320],{},"1",[286,322,324],{"id":323},"effort","Effort",[291,326,327,330],{},[27,328,329],{},"15min"," (about 15 minutes)",[286,332,333],{"id":56},"Reversibility",[291,335,336],{},"non-destructive",[286,338,340],{"id":339},"regulatory","Regulatory",[291,342,343],{},"GDPR Art. 6 (lawful basis), GDPR Art. 7 (consent)",[59,345,347],{"id":346},"see-also","See also",[17,349,350,358,365],{},[20,351,352,357],{},[353,354,356],"a",{"href":355},"\u002Fcategories\u002Fconsent\u002F","Consent rules"," — other rules in this category",[20,359,360,364],{},[353,361,363],{"href":362},"\u002Fhealth-score\u002F","Health score"," — how this rule contributes to the score",[20,366,367,371],{},[353,368,370],{"href":369},"\u002Frules\u002F","Rules catalog"," — browse all rules",[373,374,375],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":107,"searchDepth":121,"depth":121,"links":377},[378,379,380,381,382,383],{"id":61,"depth":121,"text":62},{"id":83,"depth":121,"text":84},{"id":92,"depth":121,"text":93},{"id":238,"depth":121,"text":239},{"id":277,"depth":121,"text":278},{"id":346,"depth":121,"text":347},[385,388,390],{"label":386,"href":387},"API Reference","\u002F",{"label":389,"href":369},"Rules",{"label":29},{"cards":392,"onpage":404},[393],{"title":394,"tabs":395},"Evaluate",[396,400],{"label":397,"language":398,"code":399},"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-wait-for-update\",\"url\":\"https:\u002F\u002Fexample.com\"}'\n",{"label":401,"language":402,"code":403},"MCP","text","User: Run consent-cmp-wait-for-update on https:\u002F\u002Fexample.com\n\n# Tool call\n{\n  \"tool\": \"evaluate_rule\",\n  \"arguments\": {\n    \"rule_id\": \"consent-cmp-wait-for-update\",\n    \"url\": \"https:\u002F\u002Fexample.com\"\n  }\n}\n",[405,406,407,408,409],{"id":61,"label":62},{"id":83,"label":84},{"id":92,"label":93},{"id":238,"label":239},{"id":277,"label":278},null,"Checks whether the CMP tag has a waitForUpdate value configured, ensuring consent-dependent tags pause for the CMP to respond before evaluating.","md",{},true,"\u002Frules\u002Fconsent-cmp-wait-for-update","TechArticle",{"title":5,"description":411},"rules\u002Fconsent-cmp-wait-for-update",false,"0gxuGkv86rq_GnzKrymEiXzsSdBEYW0mFL-oeCuaM5U",1796069483288]