[{"data":1,"prerenderedAt":566},["ShallowReactive",2],{"rule-ad-custom-html-consent":3},{"id":4,"title":5,"body":6,"breadcrumb":530,"coderail":537,"dateModified":556,"datePublished":556,"description":557,"extension":558,"meta":559,"navigation":293,"next":556,"path":560,"prev":556,"schemaType":561,"seo":562,"stem":563,"wide":564,"__hash__":565},"docs\u002Frules\u002Fad-custom-html-consent.md","Custom HTML ad pixels without consent requirement",{"type":7,"value":8,"toc":522},"minimark",[9,16,54,59,101,105,112,116,378,382,421,425,490,494,518],[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",{},"ad-custom-html-consent",[20,31,32,35],{},[13,33,34],{},"purpose"," — Detect Custom HTML ad pixel tags that have no consent configured in GTM",[20,37,38,41],{},[13,39,40],{},"effect"," — Ad pixels fire for all visitors regardless of consent choice",[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,86,89,90,93,94,69,97,100],{},"The rule scans active Custom HTML tags for seven ad platform pixel patterns: Facebook\u002FMeta (",[27,63,64],{},"fbq(","), LinkedIn (",[27,67,68],{},"lintrk("," or ",[27,71,72],{},"_linkedin_data_partner_id","), TikTok (",[27,75,76],{},"ttq.load","), Snapchat (",[27,79,80],{},"snaptr(","), Reddit (",[27,83,84],{},"rdt(","), Twitter\u002FX (",[27,87,88],{},"twq(","), and Pinterest (",[27,91,92],{},"pintrk(","). For each matched tag, the rule checks whether the GTM consent setting is ",[27,95,96],{},"NOT_NEEDED",[27,98,99],{},"NOT_SET",". Paused tags are excluded. When a CMP is detected elsewhere in the container, the rule drops severity to medium — page-level consent management may already gate these pixels externally.",[55,102,104],{"id":103},"why-it-matters","Why it matters",[10,106,107,108,111],{},"Unlike native GTM tag templates, Custom HTML tags have no built-in consent enforcement. A native LinkedIn Insight Tag respects GTM's consent framework automatically. A Custom HTML tag with ",[27,109,110],{},"lintrk()"," does not — it fires regardless of the visitor's consent choice unless a page-level CMP blocks it. If consent is managed inside GTM, these tags need explicit consent configuration. If a page-level CMP (OneTrust, Cookiebot, etc.) blocks tracking scripts, verify that each pixel domain is actually covered. Regulatory: GDPR Art. 6 (lawful basis), CCPA\u002FCPRA.",[55,113,115],{"id":114},"example","Before \u002F after",[117,118,119,226],"compare",{},[120,121,123],"compare-col",{"label":122},"Before — flagged",[124,125,130],"pre",{"className":126,"code":127,"language":128,"meta":129,"style":129},"language-js shiki shiki-themes github-light github-dark","\u003C!-- Custom HTML tag: Facebook Pixel -->\n\u003C!-- GTM consent: NOT_SET -->\n\u003Cscript>\n  !function(f,b,e,v,n,t,s){\u002F* fbq loader *\u002F}(window,document,'script');\n  fbq('init', '123456789');\n  fbq('track', 'PageView');\n\u003C\u002Fscript>\n","js","",[27,131,132,159,178,191,204,210,216],{"__ignoreMap":129},[133,134,137,141,145,149,153,156],"span",{"class":135,"line":136},"line",1,[133,138,140],{"class":139},"szBVR","\u003C!--",[133,142,144],{"class":143},"sVt8B"," Custom ",[133,146,148],{"class":147},"sj4cs","HTML",[133,150,152],{"class":151},"sScJk"," tag",[133,154,155],{"class":143},": Facebook Pixel ",[133,157,158],{"class":139},"-->\n",[133,160,162,164,167,170,173,175],{"class":135,"line":161},2,[133,163,140],{"class":139},[133,165,166],{"class":147}," GTM",[133,168,169],{"class":151}," consent",[133,171,172],{"class":143},": ",[133,174,99],{"class":147},[133,176,177],{"class":139}," -->\n",[133,179,181,184,188],{"class":135,"line":180},3,[133,182,183],{"class":143},"\u003C",[133,185,187],{"class":186},"s9eBZ","script",[133,189,190],{"class":143},">\n",[133,192,194,197,201],{"class":135,"line":193},4,[133,195,196],{"class":143},"  !function(f,b,e,v,n,t,s){",[133,198,200],{"class":199},"sJ8bj","\u002F* fbq loader *\u002F",[133,202,203],{"class":143},"}(window,document,'script');\n",[133,205,207],{"class":135,"line":206},5,[133,208,209],{"class":143},"  fbq('init', '123456789');\n",[133,211,213],{"class":135,"line":212},6,[133,214,215],{"class":143},"  fbq('track', 'PageView');\n",[133,217,219,222,224],{"class":135,"line":218},7,[133,220,221],{"class":143},"\u003C\u002F",[133,223,187],{"class":186},[133,225,190],{"class":143},[120,227,229],{"label":228},"After — fixed",[124,230,232],{"className":126,"code":231,"language":128,"meta":129,"style":129},"\u003C!-- Option A: switch to the native Facebook Pixel template -->\n\u003C!-- Set consent type: ad_storage (Required) in the GTM template UI -->\n\n\u003C!-- Option B: keep Custom HTML, add consent configuration -->\n\u003C!-- GTM tag settings → Additional Consent Checks → NEEDED -->\n\u003C!-- Required consent type: ad_storage -->\n\u003Cscript>\n  !function(f,b,e,v,n,t,s){\u002F* fbq loader *\u002F}(window,document,'script');\n  fbq('init', '123456789');\n  fbq('track', 'PageView');\n\u003C\u002Fscript>\n",[27,233,234,254,289,295,314,328,342,350,359,364,369],{"__ignoreMap":129},[133,235,236,238,241,244,246,249,252],{"class":135,"line":136},[133,237,140],{"class":139},[133,239,240],{"class":143}," Option ",[133,242,243],{"class":151},"A",[133,245,172],{"class":143},[133,247,248],{"class":139},"switch",[133,250,251],{"class":143}," to the native Facebook Pixel template ",[133,253,158],{"class":139},[133,255,256,258,261,264,266,269,272,275,278,281,284,287],{"class":135,"line":161},[133,257,140],{"class":139},[133,259,260],{"class":143}," Set consent ",[133,262,263],{"class":151},"type",[133,265,172],{"class":143},[133,267,268],{"class":151},"ad_storage",[133,270,271],{"class":143}," (Required) ",[133,273,274],{"class":139},"in",[133,276,277],{"class":143}," the ",[133,279,280],{"class":147},"GTM",[133,282,283],{"class":143}," template ",[133,285,286],{"class":147},"UI",[133,288,177],{"class":139},[133,290,291],{"class":135,"line":180},[133,292,294],{"emptyLinePlaceholder":293},true,"\n",[133,296,297,299,301,304,307,309,312],{"class":135,"line":193},[133,298,140],{"class":139},[133,300,240],{"class":143},[133,302,303],{"class":151},"B",[133,305,306],{"class":143},": keep Custom ",[133,308,148],{"class":147},[133,310,311],{"class":143},", add consent configuration ",[133,313,158],{"class":139},[133,315,316,318,320,323,326],{"class":135,"line":206},[133,317,140],{"class":139},[133,319,166],{"class":147},[133,321,322],{"class":143}," tag settings → Additional Consent Checks → ",[133,324,325],{"class":147},"NEEDED",[133,327,177],{"class":139},[133,329,330,332,335,337,340],{"class":135,"line":212},[133,331,140],{"class":139},[133,333,334],{"class":143}," Required consent ",[133,336,263],{"class":151},[133,338,339],{"class":143},": ad_storage ",[133,341,158],{"class":139},[133,343,344,346,348],{"class":135,"line":218},[133,345,183],{"class":143},[133,347,187],{"class":186},[133,349,190],{"class":143},[133,351,353,355,357],{"class":135,"line":352},8,[133,354,196],{"class":143},[133,356,200],{"class":199},[133,358,203],{"class":143},[133,360,362],{"class":135,"line":361},9,[133,363,209],{"class":143},[133,365,367],{"class":135,"line":366},10,[133,368,215],{"class":143},[133,370,372,374,376],{"class":135,"line":371},11,[133,373,221],{"class":143},[133,375,187],{"class":186},[133,377,190],{"class":143},[55,379,381],{"id":380},"remediation","Remediation",[383,384,385,392,398,401,415,418],"ol",{},[20,386,387,388,391],{},"Determine whether consent is managed inside GTM or via a page-level CMP (check for CMP scripts in the page ",[27,389,390],{},"\u003Chead>",").",[20,393,394,395,397],{},"If consent is managed inside GTM: open each flagged Custom HTML tag, set Additional Consent Status to \"NEEDED,\" and add ",[27,396,268],{}," as the required consent type.",[20,399,400],{},"If a native GTM template exists for the platform, migrate from Custom HTML to the template — native templates enforce consent automatically.",[20,402,403,404,407,408,407,411,414],{},"If consent is managed at the page level: verify your CMP blocks each pixel domain before the GTM container loads. Check for ",[27,405,406],{},"facebook.net",", ",[27,409,410],{},"snap.licdn.com",[27,412,413],{},"analytics.tiktok.com",", and equivalent domains.",[20,416,417],{},"Add any missing domains to your CMP's blocking configuration, or wire consent inside GTM for any gaps.",[20,419,420],{},"Test with the CMP in \"deny all\" mode and confirm the pixels do not fire.",[55,422,424],{"id":423},"metadata","Metadata",[426,427,430,431,436,430,440,444,430,447,451,430,454,457,430,460,464,430,467,471,430,477,480,430,483,487],"dl",{"className":428},[429],"spec-list","\n  ",[432,433,435],"dt",{"id":434},"severity","Severity",[437,438,439],"dd",{},"high",[432,441,443],{"id":442},"tier","Tier",[437,445,446],{},"optimization",[432,448,450],{"id":449},"category","Category",[437,452,453],{},"ads",[432,455,456],{"id":46},"Layer",[437,458,459],{},"container",[432,461,463],{"id":462},"version","Version",[437,465,466],{},"1",[432,468,470],{"id":469},"effort","Effort",[437,472,473,476],{},[27,474,475],{},"15min"," (about 15 minutes)",[432,478,479],{"id":52},"Reversibility",[437,481,482],{},"non-destructive",[432,484,486],{"id":485},"regulatory","Regulatory",[437,488,489],{},"GDPR Art. 6 (lawful basis), CCPA\u002FCPRA",[55,491,493],{"id":492},"see-also","See also",[17,495,496,504,511],{},[20,497,498,503],{},[499,500,502],"a",{"href":501},"\u002Fcategories\u002Fads\u002F","Ads rules"," — other rules in this category",[20,505,506,510],{},[499,507,509],{"href":508},"\u002Fhealth-score\u002F","Health score"," — how this rule contributes to the score",[20,512,513,517],{},[499,514,516],{"href":515},"\u002Frules\u002F","Rules catalog"," — browse all rules",[519,520,521],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}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 .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}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":129,"searchDepth":161,"depth":161,"links":523},[524,525,526,527,528,529],{"id":57,"depth":161,"text":58},{"id":103,"depth":161,"text":104},{"id":114,"depth":161,"text":115},{"id":380,"depth":161,"text":381},{"id":423,"depth":161,"text":424},{"id":492,"depth":161,"text":493},[531,534,536],{"label":532,"href":533},"API Reference","\u002F",{"label":535,"href":515},"Rules",{"label":29},{"cards":538,"onpage":550},[539],{"title":540,"tabs":541},"Evaluate",[542,546],{"label":543,"language":544,"code":545},"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\":\"ad-custom-html-consent\",\"url\":\"https:\u002F\u002Fexample.com\"}'\n",{"label":547,"language":548,"code":549},"MCP","text","User: Run ad-custom-html-consent on https:\u002F\u002Fexample.com\n\n# Tool call\n{\n  \"tool\": \"evaluate_rule\",\n  \"arguments\": {\n    \"rule_id\": \"ad-custom-html-consent\",\n    \"url\": \"https:\u002F\u002Fexample.com\"\n  }\n}\n",[551,552,553,554,555],{"id":57,"label":58},{"id":103,"label":104},{"id":114,"label":115},{"id":380,"label":381},{"id":423,"label":424},null,"Checks whether Custom HTML tags containing ad platform pixels have consent configured in GTM.","md",{},"\u002Frules\u002Fad-custom-html-consent","TechArticle",{"title":5,"description":557},"rules\u002Fad-custom-html-consent",false,"m2ydG4JtoeQwQUe9fR0d2SgpwFdNVSxmyGXEa3q4p-c",1796069483091]