Ad platform IDs hardcoded across multiple tags
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.
Summary
- rule_id —
ad-id-hardcoded - purpose — Detect ad account IDs hardcoded as literals in 3 or more tags for the same platform
- effect — Each ID change requires manual edits to every affected tag; missed tags silently misreport
- layer — container
- reversibility — non-destructive
What fires this
The rule filters active tags where adPlatform metadata is populated by the parser — native ad tags such as Google Ads, LinkedIn, and Facebook. For each tag, it checks whether 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.
Why it matters
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, {{Google Ads ID}} — stores the ID in one place. Updating the Constant propagates the change to all referencing tags in a single publish.
Before / after
Google Ads Conversion Tag #1
Conversion ID: AW-123456789 ← literal
Google Ads Conversion Tag #2
Conversion ID: AW-123456789 ← literal
Google Ads Remarketing Tag
Conversion ID: AW-123456789 ← literal
GTM Variable: CONST - Google Ads ID
Value: AW-123456789
Google Ads Conversion Tag #1
Conversion ID: {{CONST - Google Ads ID}}
Google Ads Conversion Tag #2
Conversion ID: {{CONST - Google Ads ID}}
Google Ads Remarketing Tag
Conversion ID: {{CONST - Google Ads ID}}
Remediation
- Identify all unique hardcoded account IDs flagged (for example,
AW-123456789). - For each ID, create a GTM Constant variable with a descriptive name (for example,
CONST - Google Ads ID). - Set the Constant's value to the account ID.
- Open each flagged tag and replace the hardcoded ID with a reference to the new variable (
{{CONST - Google Ads ID}}). - Preview and confirm each tag resolves the correct ID.
- Publish the container.
Metadata
- Severity
- low
- Tier
- info
- Category
- ads
- Layer
- container
- Version
- 1
- Effort
15min(about 15 minutes)- Reversibility
- non-destructive
See also
- Ads rules — other rules in this category
- Health score — how this rule contributes to the score
- Rules catalog — browse all rules
Examples
curl https://developer.tagmanifest.com/v1/evaluate-rule \
-H "Authorization: Bearer $TM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rule_id":"ad-id-hardcoded","url":"https://example.com"}'
User: Run ad-id-hardcoded on https://example.com
# Tool call
{
"tool": "evaluate_rule",
"arguments": {
"rule_id": "ad-id-hardcoded",
"url": "https://example.com"
}
}