Skip to main content
TagManifest /Docs Dashboard

Custom HTML ad pixels without consent requirement

Checks whether Custom HTML tags containing ad platform pixels have consent configured in GTM.

On this page 6

Summary

  • rule_id — ad-custom-html-consent
  • purpose — Detect Custom HTML ad pixel tags that have no consent configured in GTM
  • effect — Ad pixels fire for all visitors regardless of consent choice
  • layer — container
  • reversibility — non-destructive

What fires this

The rule scans active Custom HTML tags for seven ad platform pixel patterns: Facebook/Meta (fbq(), LinkedIn (lintrk( or _linkedin_data_partner_id), TikTok (ttq.load), Snapchat (snaptr(), Reddit (rdt(), Twitter/X (twq(), and Pinterest (pintrk(). For each matched tag, the rule checks whether the GTM consent setting is NOT_NEEDED or 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.

Why it matters

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 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/CPRA.

Before / after

<!-- Custom HTML tag: Facebook Pixel -->
<!-- GTM consent: NOT_SET -->
<script>
  !function(f,b,e,v,n,t,s){/* fbq loader */}(window,document,'script');
  fbq('init', '123456789');
  fbq('track', 'PageView');
</script>
<!-- Option A: switch to the native Facebook Pixel template -->
<!-- Set consent type: ad_storage (Required) in the GTM template UI -->

<!-- Option B: keep Custom HTML, add consent configuration -->
<!-- GTM tag settings → Additional Consent Checks → NEEDED -->
<!-- Required consent type: ad_storage -->
<script>
  !function(f,b,e,v,n,t,s){/* fbq loader */}(window,document,'script');
  fbq('init', '123456789');
  fbq('track', 'PageView');
</script>

Remediation

  1. Determine whether consent is managed inside GTM or via a page-level CMP (check for CMP scripts in the page <head>).
  2. If consent is managed inside GTM: open each flagged Custom HTML tag, set Additional Consent Status to "NEEDED," and add ad_storage as the required consent type.
  3. If a native GTM template exists for the platform, migrate from Custom HTML to the template — native templates enforce consent automatically.
  4. If consent is managed at the page level: verify your CMP blocks each pixel domain before the GTM container loads. Check for facebook.net, snap.licdn.com, analytics.tiktok.com, and equivalent domains.
  5. Add any missing domains to your CMP's blocking configuration, or wire consent inside GTM for any gaps.
  6. Test with the CMP in "deny all" mode and confirm the pixels do not fire.

Metadata

Severity
high
Tier
optimization
Category
ads
Layer
container
Version
1
Effort
15min (about 15 minutes)
Reversibility
non-destructive
Regulatory
GDPR Art. 6 (lawful basis), CCPA/CPRA

See also

Examples

Evaluate
curl https://developer.tagmanifest.com/v1/evaluate-rule \
  -H "Authorization: Bearer $TM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rule_id":"ad-custom-html-consent","url":"https://example.com"}'