Pixel Auditor uses four parallel detection strategies. Whichever fires first wins; subsequent confirmations are merged. Every layer runs at document_start, before the page's own scripts execute, so nothing slips past.
Layer 1 — JavaScript global scanning
Watches the global object for known platform signatures the moment they're defined: window.gtag, window.google_tag_manager, window.fbq, window._fbq, window._uetq, window.UET, window.clarity, window._linkedin_partner_id, window._linkedin_data_partner_ids, window.lintrk, plus globals for major server-side / vendor-API SDKs detected as part of SST classification.
Layer 2 — DOM script scanning
Parses every <script> tag's src and content against platform-specific regexes. Catches:
googletagmanager.com/gtm.js,gtag/js,analytics.jsconnect.facebook.net/.../fbevents.jssnap.licdn.com/li.lms-analytics/insight.min.jsbat.bing.com/bat.js,clarity.ms/tag- Inline event-tracking blocks containing
fbq('init',,gtag('config',, etc.
A MutationObserver watches for dynamically injected <script> nodes after page load — Pixel Auditor catches lazy-loaded tags injected by your CMP, by GTM, or by a feature flag.
Layer 3 — Network interception
Patches native browser APIs at document_start. Originals are preserved as _fetch, _open/_send, _Image, _beacon and always called through.
window.fetch— catches GA4/g/collect, Meta/tr, Bingbat.bing.com, etc.XMLHttpRequest.open / send— same patternnew Image()— image-beacon pixels (1×1 GIFs)navigator.sendBeacon— page-unload tracking
Layer 4 — JS API hooks
Wraps tag SDK functions while preserving identity. Each hook captures, then passes through:
dataLayer.push()— every GTM/GA4 event, routed bysend_toprefix (G-, AW-, MC-)gtag()— bothgtag('event', …)andgtag('consent', …)fbq()— Metatrack/trackCustom, iterating all initialized pixelsuetq.push(),UETconstructor — Bing UET (array queue + instance)clarity()— Microsoft Clarity JS calls
Re-scan timing
The four layers run at 0 ms (document_start), then re-scan at 800 ms, 2.5 s, and 5 s to catch async-loaded tags. The MutationObserver runs continuously.
Deduplication
The same fire can be captured by multiple layers (network + JS hook). Pixel Auditor deduplicates with a 400 ms window keyed by tagId + eventName + extractedId, plus null-ID suppression to handle body-parse failures cleanly. → Duplicate detection
Dynamic re-routing (gtag.js)
gtag.js routes GA4, Google Ads, and Merchant Center hits through the same /g/collect endpoint. Pixel Auditor reads the tid parameter prefix to attribute correctly:
G-* | Google Analytics 4 |
AW-* | Google Ads |
MC-* | Google Merchant Center |
UA-* | Universal Analytics (retired) |