Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Tracking not working on AMP pages: how to find and fix it

TRK-385Low impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

AMP (Accelerated Mobile Pages) is a restricted version of HTML. It blocks most custom JavaScript, including the standard gtag.js snippet, the Meta Pixel base code and most tag manager containers. Tracking on AMP has to go through the amp-analytics component instead.

Why it costs you leads or sales

If AMP pages are untracked, visits and conversions that start there vanish from your reports. Traffic looks lower than it is, and campaigns that send people to AMP URLs look like they perform badly. Ad platforms get no conversion signals, so automated bidding learns from incomplete data.

Visitor ID mismatches cause a quieter problem. A person who reads an AMP page, then clicks through to your main site and buys, may be counted as a new direct visitor. The original source is lost and sales get credited to the wrong channel.

Where attribution is lost on an AMP journey
  1. Search or ad clickVisitor lands on the AMP URL
  2. AMP page viewNo amp-analytics, nothing recorded
  3. Click to main siteNew visitor ID, source lost
  4. Purchase or leadCounted as direct

The visit starts on an AMP page with no working tag, so later steps lose their source.

Reported sessions vs real visits for AMP landing pagesExample numbers
Reported sessions vs real visits for AMP landing pages (example)Real visits: 1,000 visits; Reported, no amp-analytics: 0 visits; Reported, partial setup: 600 visits; Reported, full setup: 980 visits03837671,0000600980Real visitsReported, no amp-anal…Reported, partial set…Reported, full setupvisits

Example: 1,000 real visits to AMP pages, of which only a few are recorded when tracking is missing or partly set up.

How to check if your site has it

Check AMP tracking by hand
  1. Find your AMP URLs

    Open a page and view source. Look for <link rel="amphtml" href="...">. That URL is the AMP version. AMP pages also carry <html amp> or <html ⚡>.

  2. Look for amp-analytics

    View source on the AMP page and search for amp-analytics. If there is none, and no amp-auto-ads or AMP Tag Manager container, nothing is tracked.

  3. Watch the network tab

    Open DevTools, go to Network, reload the AMP page and filter for collect (GA4) or your platform's domain. No requests means no tracking.

  4. Use GA4 DebugView or Realtime

    Visit the AMP page on your phone or in a private window and check Realtime in GA4. Confirm the visit appears with the right page path.

  5. Compare client IDs

    Click from the AMP page to the main site and check the GA4 client ID is the same. If not, GA4 treats them as two people.

How to fix it

You have two sound options. Either add amp-analytics to every AMP template, or retire AMP and redirect AMP URLs to the normal pages. The second is often simpler if AMP gives you no benefit.

Add AMP tracking by platform
  1. Check your AMP plugin

    If you use the official AMP plugin, tracking from plugins like Site Kit can be output to AMP pages. Open Site Kit, Settings, Connect more services, Analytics, and make sure the AMP option is on. Other analytics plugins vary, so check their AMP settings.

  2. Or turn AMP off

    In the AMP plugin settings, switch to a non-AMP template mode or deactivate the plugin, then redirect old /amp/ URLs to the standard pages.

GA4 on an AMP page with amp-analyticshtml
<!-- in <head> -->
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>

<!-- in <body> -->
<amp-analytics type="gtag" data-credentials="include">
<script type="application/json">
{
  "vars": {
    "gtag_id": "G-XXXXXXXXXX",
    "config": {
      "G-XXXXXXXXXX": { "groups": "default" }
    }
  },
  "triggers": {
    "cta_click": {
      "on": "click",
      "selector": "#cta-button",
      "vars": {
        "event_name": "cta_click"
      }
    }
  }
}
</script>
</amp-analytics>

For visitor IDs, AMP uses its own Client ID service unless you link it. In GA4 and Tag Manager, keep the same Measurement ID on AMP and main pages, and where the AMP page is served from the Google AMP Cache, rely on the AMP Client ID API so the ID can be passed to your domain. If linking is not possible, expect some AMP visits to appear as separate users.

How to confirm it's fixed

Confirmation checklist
  • Open an AMP URL on a phone and see the visit in GA4 Realtime
  • Network tab shows a request to the analytics endpoint on page load
  • Key clicks or form submits appear as events in DebugView
  • Client ID stays the same when moving from AMP to the main site
  • The landing page report shows AMP URLs with sensible numbers
  • Conversions from AMP visits are attributed to the right source

How to prevent it happening again

Prevention habits
  • Keep a list of which templates have AMP versions
  • Add AMP to your release checklist whenever tracking changes
  • Check AMP URLs by hand after theme or plugin updates
  • Decide whether AMP is still worth keeping; remove it if not
  • Use one Measurement ID across AMP and non-AMP pages
  • Review AMP landing page traffic monthly for sudden drops

How FunnelGuard handles this

FunnelGuard does not check AMP tracking yet. It is a possible future check, so today you would not get an alert for it.

What FunnelGuard does do is run your real customer journeys on a schedule, such as lead forms and checkouts, and check the tracking hits sent to GA4, Google Ads, Meta and other platforms on those standard pages. If a tag stops firing on your main funnel, that is covered. To watch AMP pages, use the manual checks above, GA4 Realtime and a monthly look at AMP landing page traffic. You can also start with the free read-only website audit or the Free plan (1 site, 2 journeys, daily checks, no card) to cover your main funnel.

A tag that never fires on AMP

The visitor reaches the AMP page, but the normal tag is blocked and no hit is sent.

Questions people ask

Why is my Google Analytics not tracking AMP pages?

AMP does not allow the standard gtag.js or Tag Manager web snippet. You need the amp-analytics component, or an AMP-type Tag Manager container, on each AMP page. Without it, no hits are sent.

How do I add GA4 to AMP pages?

Load the amp-analytics script in the head and add an amp-analytics block of type gtag with your GA4 Measurement ID. If you use WordPress, Site Kit can output it for you. Check the result in GA4 Realtime or DebugView.

Can I use a normal Google Tag Manager container on AMP?

No. AMP needs a container created with AMP as the target platform, and its own snippets. A standard web container will not run on AMP pages.

Why do AMP visitors show up as new users on my main site?

AMP can use a different client ID from your main domain, especially when pages are served from the AMP cache. GA4 then sees two visitors. Use the AMP Client ID API and the same Measurement ID to reduce this, though some mismatch may remain.

Does the Meta Pixel work on AMP pages?

Not as the standard script. AMP blocks it, so you would need an amp-analytics pixel request if Meta documents one for your use, or move the conversion step to a standard page. Check Meta's current guidance.

Should I just remove AMP instead of fixing tracking?

If AMP gives you no real benefit, removing it is often simpler. Redirect AMP URLs to the standard versions so old links and search results still work, then your normal tags cover every visit.

Does FunnelGuard check tracking on AMP pages?

No, not yet. It is a possible future check. FunnelGuard does check tracking hits on your standard funnel journeys, so use manual checks and GA4 Realtime for AMP pages.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.