[{"data":1,"prerenderedAt":281},["ShallowReactive",2],{"rule-ad-id-hardcoded":3},{"id":4,"title":5,"body":6,"breadcrumb":245,"coderail":252,"dateModified":270,"datePublished":270,"description":271,"extension":272,"meta":273,"navigation":274,"next":270,"path":275,"prev":270,"schemaType":276,"seo":277,"stem":278,"wide":279,"__hash__":280},"docs\u002Frules\u002Fad-id-hardcoded.md","Ad platform IDs hardcoded across multiple tags",{"type":7,"value":8,"toc":236},"minimark",[9,16,54,59,70,74,81,85,111,115,146,150,208,212],[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-id-hardcoded",[20,31,32,35],{},[13,33,34],{},"purpose"," — Detect ad account IDs hardcoded as literals in 3 or more tags for the same platform",[20,37,38,41],{},[13,39,40],{},"effect"," — Each ID change requires manual edits to every affected tag; missed tags silently misreport",[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],{},"The rule filters active tags where ",[27,63,64],{},"adPlatform"," metadata is populated by the parser — native ad tags such as Google Ads, LinkedIn, and Facebook. For each tag, it checks whether ",[27,67,68],{},"adPlatform.isIdDynamic"," is false, meaning the account ID is a hardcoded literal rather than a GTM (Google Tag Manager) variable reference. Tags sharing the same platform and the same hardcoded account ID are grouped. The rule fires when 3 or more tags in a group meet that condition. Paused tags are excluded.",[55,71,73],{"id":72},"why-it-matters","Why it matters",[10,75,76,77,80],{},"When a campaign migrates to a new ad account, every tag containing the old hardcoded ID must be updated one by one. Any tag missed reports to the wrong account or drops data without warning. A GTM Constant variable — for example, ",[27,78,79],{},"{{Google Ads ID}}"," — stores the ID in one place. Updating the Constant propagates the change to all referencing tags in a single publish.",[55,82,84],{"id":83},"example","Before \u002F after",[86,87,88,102],"compare",{},[89,90,92],"compare-col",{"label":91},"Before — flagged",[93,94,100],"pre",{"className":95,"code":97,"language":98,"meta":99},[96],"language-text","Google Ads Conversion Tag #1\n  Conversion ID: AW-123456789  ← literal\n\nGoogle Ads Conversion Tag #2\n  Conversion ID: AW-123456789  ← literal\n\nGoogle Ads Remarketing Tag\n  Conversion ID: AW-123456789  ← literal\n","text","",[27,101,97],{"__ignoreMap":99},[89,103,105],{"label":104},"After — fixed",[93,106,109],{"className":107,"code":108,"language":98,"meta":99},[96],"GTM Variable: CONST - Google Ads ID\n  Value: AW-123456789\n\nGoogle Ads Conversion Tag #1\n  Conversion ID: {{CONST - Google Ads ID}}\n\nGoogle Ads Conversion Tag #2\n  Conversion ID: {{CONST - Google Ads ID}}\n\nGoogle Ads Remarketing Tag\n  Conversion ID: {{CONST - Google Ads ID}}\n",[27,110,108],{"__ignoreMap":99},[55,112,114],{"id":113},"remediation","Remediation",[116,117,118,125,131,134,140,143],"ol",{},[20,119,120,121,124],{},"Identify all unique hardcoded account IDs flagged (for example, ",[27,122,123],{},"AW-123456789",").",[20,126,127,128,124],{},"For each ID, create a GTM Constant variable with a descriptive name (for example, ",[27,129,130],{},"CONST - Google Ads ID",[20,132,133],{},"Set the Constant's value to the account ID.",[20,135,136,137,124],{},"Open each flagged tag and replace the hardcoded ID with a reference to the new variable (",[27,138,139],{},"{{CONST - Google Ads ID}}",[20,141,142],{},"Preview and confirm each tag resolves the correct ID.",[20,144,145],{},"Publish the container.",[55,147,149],{"id":148},"metadata","Metadata",[151,152,155,156,161,155,165,169,155,172,176,155,179,182,155,185,189,155,192,196,155,202,205],"dl",{"className":153},[154],"spec-list","\n  ",[157,158,160],"dt",{"id":159},"severity","Severity",[162,163,164],"dd",{},"low",[157,166,168],{"id":167},"tier","Tier",[162,170,171],{},"info",[157,173,175],{"id":174},"category","Category",[162,177,178],{},"ads",[157,180,181],{"id":46},"Layer",[162,183,184],{},"container",[157,186,188],{"id":187},"version","Version",[162,190,191],{},"1",[157,193,195],{"id":194},"effort","Effort",[162,197,198,201],{},[27,199,200],{},"15min"," (about 15 minutes)",[157,203,204],{"id":52},"Reversibility",[162,206,207],{},"non-destructive",[55,209,211],{"id":210},"see-also","See also",[17,213,214,222,229],{},[20,215,216,221],{},[217,218,220],"a",{"href":219},"\u002Fcategories\u002Fads\u002F","Ads rules"," — other rules in this category",[20,223,224,228],{},[217,225,227],{"href":226},"\u002Fhealth-score\u002F","Health score"," — how this rule contributes to the score",[20,230,231,235],{},[217,232,234],{"href":233},"\u002Frules\u002F","Rules catalog"," — browse all rules",{"title":99,"searchDepth":237,"depth":237,"links":238},2,[239,240,241,242,243,244],{"id":57,"depth":237,"text":58},{"id":72,"depth":237,"text":73},{"id":83,"depth":237,"text":84},{"id":113,"depth":237,"text":114},{"id":148,"depth":237,"text":149},{"id":210,"depth":237,"text":211},[246,249,251],{"label":247,"href":248},"API Reference","\u002F",{"label":250,"href":233},"Rules",{"label":29},{"cards":253,"onpage":264},[254],{"title":255,"tabs":256},"Evaluate",[257,261],{"label":258,"language":259,"code":260},"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-id-hardcoded\",\"url\":\"https:\u002F\u002Fexample.com\"}'\n",{"label":262,"language":98,"code":263},"MCP","User: Run ad-id-hardcoded on https:\u002F\u002Fexample.com\n\n# Tool call\n{\n  \"tool\": \"evaluate_rule\",\n  \"arguments\": {\n    \"rule_id\": \"ad-id-hardcoded\",\n    \"url\": \"https:\u002F\u002Fexample.com\"\n  }\n}\n",[265,266,267,268,269],{"id":57,"label":58},{"id":72,"label":73},{"id":83,"label":84},{"id":113,"label":114},{"id":148,"label":149},null,"Checks whether ad account IDs are repeated as literal values across 3 or more tags for the same platform instead of being stored in a GTM variable.","md",{},true,"\u002Frules\u002Fad-id-hardcoded","TechArticle",{"title":5,"description":271},"rules\u002Fad-id-hardcoded",false,"OWnktjkLv5wy_QQevbYREp4NFPtWvr1m924_HReiaWw",1796069483097]