Tracking and Analytics Audit: GA4, GTM and Marketing Pixels

AI OVERVIEW

Check what loads where, test every template, watch the Network tab, and confirm one page_view per SPA route and no tags before consent.

Tracking breaks quietly. The site loads, the forms submit, the checkout works, and somewhere behind it all GA4 is counting every pageview twice, the purchase pixel is firing on product pages, and the newest landing page template has no tracking at all.

Nobody notices until a report looks strange, and by then weeks of data are wrong. A tracking audit is how you catch that early.

Start With What's Installed, and Where

Before testing whether tags fire correctly, figure out what's on the site. Tracking code usually comes from several places at once, and each source is a chance for duplication.

Theme / template GTM container CMS plugin / app 3rd-party widget One page 4 chances to load GA4 twice
Write down every tag, its ID, and where it loads from. That list often explains the bad numbers on its own.

GA4: one property, loaded once

Check that every page uses the right measurement ID (it starts with G-) and loads it once. The most common problem:

Theme code → G-ABC123+GTM → G-ABC123=2 page_views per visit

Engagement rate, pages per session, and conversion rate all drift. It usually happens when a developer adds the Google tag directly without knowing GTM already handles it, or a plugin adds its own.

  • Staging IDs on the live siteA test measurement ID quietly sends production traffic to the wrong property.
  • Different IDs per templateCommon after a redesign, when new templates were built from a different starter.
  • Leftover UA- codeUniversal Analytics stopped processing data in 2023 (2024 for 360 properties). Old snippets do nothing except add page weight.

GTM: the right container

Every container ID starts with GTM-. Compare the one on the live site with the one your team edits. A site can load the staging container, an old agency's container, or one copied from a sister site, and each loads without errors. Also check whether more than one container loads, since overlapping tags across two containers is duplicate tracking waiting to happen.

Marketing pixels

Google Ads, Meta Pixel, LinkedIn Insight Tag, TikTok, affiliate scripts, and heatmap tools each have their own rules. For every one, confirm three things:

  • Which pages it loads onPurchase pixels belong on confirmation pages, not product pages.
  • What triggers each eventThe trigger, not the tag, decides when data is sent.
  • Whether it's in GTM or hard-codedHard-coded tags skip the consent rules set up in the container, which makes them a common source of tags firing without consent.

Check Every Template, Not Just the Homepage

Page typeWhat to confirm
HomepageGA4 and global tags load once
Blog postpage_view plus any content events
Product pageview_item and add_to_cart fire with product data
Landing pageCampaign tags and lead events
Checkoutbegin_checkout and payment steps
Confirmation pagepurchase or conversion fires once, with value
SPA routeA new page_view on every route change
Why redesigns break tracking

GTM triggers often depend on CSS classes, form IDs, or button text. Change the markup and the trigger silently stops matching. The site launches fine and conversion data stops on launch day.

Single-Page Apps: One Load, Many Pages

In a single-page app, moving from /products to /products/wallet changes the URL without loading a new document. If tracking only runs on page load, GA4 records the first page and nothing after it. There are two common fixes, and using both is a frequent cause of duplicates:

Fix A: GA4 enhanced measurement

In the data stream settings, page views can be sent automatically on browser history changes.

Fix B: GTM History Change trigger

A trigger that fires a page_view tag on each route change.

Pick one. If both are on, every route change sends two page views. Test direct loads, internal navigation, and the back and forward buttons. Each should produce exactly one page_view with the correct page location.

Event listeners have a similar problem. If tracking attaches a click listener before the button exists and the app renders it later, the listener never attaches. The button works and the click is never counted.

Consent: Present Isn't the Same as Firing

A tag in the page source tells you nothing about whether it's allowed to run. Consent management platforms such as Cookiebot, OneTrust, and Usercentrics decide that, together with Google Consent Mode.

Basic

Tags wait

Google tags don't load at all until the visitor consents.

Advanced

Tags ping

Google tags load immediately and send cookieless pings while consent is denied, then switch to full measurement once granted.

Neither is wrong, but you need to know which you run to judge behavior. Consent Mode v2 also added ad_user_data and ad_personalization, which Google requires for certain advertising features for users in the European Economic Area.

How to test consent

Fresh windowA stored choice hides problems
→
Ignore bannerNote which requests go out
→
Reject allMarketing pixels stay silent
→
Accept allAnalytics and ad tags start sending

Tags firing before a choice, or staying blocked after acceptance, point to a consent category or trigger misconfiguration. Watch the opposite problem too: a functional script, like a booking widget or map, filed under "marketing" by mistake, so the page breaks for anyone who rejects cookies.

How to Test What Actually Fires

  • Watch the network, not the sourceIn DevTools, open the Network tab and filter by collect for GA4 (the /g/collect endpoint), facebook.com/tr for Meta Pixel, or the vendor domain for anything else. Source shows what's installed. The Network tab shows what happens.
  • Use the debugging toolsGTM Preview mode (Tag Assistant) shows which tags fired on each event and why. GA4 DebugView shows events arriving in the property in real time, with parameters.
  • Check the parametersA purchase event needs transaction_id, value, currency, and items. GA4 deduplicates purchases by transaction_id, so a missing or repeated ID causes real reporting errors.
  • Match pixel and server eventsIf you also send Meta events through the Conversions API, each event needs the same event_id in the pixel and the server event, or Meta counts it twice.

Build an expected vs actual matrix

ActionExpected eventActual eventKey parametersResult
Page loadpage_viewpage_viewpage_locationCorrect
Form submitgenerate_leadnonenoneMissing
Purchasepurchasepurchasevalue, currency, transaction_idCorrect
Signup clicksign_upsign_up ×2noneDuplicate

This is the most useful thing to hand a developer. It shows exactly what's wrong without anyone reading GTM configuration.

Where Tracking and SEO Overlap

Most tracking problems don't affect search. A page with no GA4 tag still gets crawled and indexed. Keep the two investigations separate, except in these places:

  • A GTM snippet in the wrong placeGTM's <noscript> iframe belongs right after the opening <body> tag. In the <head>, it's an invalid element, and Google's documentation says it may stop reading the head there, ignoring canonical, hreflang, or robots tags that come after it.
  • Tag weightA dozen marketing scripts on every page slows it down and can hurt responsiveness metrics like Interaction to Next Paint.
  • JavaScript errorsOne broken script can stop both content rendering and event firing. If both break on the same template at once, look for one shared cause.

Keep It From Breaking Again

Document the setup: GA4 property and measurement ID, GTM container ID, every pixel, the consent platform and mode, and each important event with its trigger, required parameters, and consent category.

Retest after anything that touches templates: redesigns, CMS migrations, checkout changes, consent tool updates, and GTM publishes. A sudden jump or drop on deploy day is far more likely to be tracking than a real shift in visitor behavior.

Auditing Tracking Across the Whole Site

Opening DevTools on every template works on a small site. On a larger one, you need a list of what loads where.

The SiteAuditLint Tracking & Pixel Audit crawls the site and lists every analytics tool, tag manager, ad pixel, and event it finds, page by page. It shows what's inside each GTM container and flags:

  • Leftover Universal Analytics codeDead UA snippets still loading on live pages.
  • Marketing tags hard-coded outside GTMThe tags most likely to bypass consent rules.
  • Pages missing the analytics tagUsually a whole template, not a single page.
  • GTM tags with no triggerConfigured tags that never fire.
  • Consent setup per pageDetection of tools like Cookiebot and Google Consent Mode, so you see which pages run tracking under which setup.

Use the crawl to find which templates are wrong, then DevTools and Tag Assistant to see exactly why. The tracking and pixels support guide covers setup.

[Add screenshot here: the Tracking & Pixels view from a real crawl, ideally showing a page with GA4 loaded twice or a hard-coded pixel outside GTM.]

Checklist

  • One GA4 measurement ID, loaded once per page
  • The correct production GTM container, and only one
  • No leftover UA- code
  • Every template tested, including confirmation pages and SPA routes
  • One page_view per SPA route change, not two
  • No marketing tags firing before consent
  • Functional scripts not blocked by consent categories
  • Purchase events with transaction_id, value, and currency
  • Pixel and Conversions API events sharing an event_id
  • GTM noscript iframe in the body, not the head
  • Tracking retested after every release that touches templates
Source code shows what's installed. The network shows what's true.