AMP and Product Analytics – Can Both Live Together?

person holding blue ballpoint pen on white notebook

AMP introduces constraints on product analytics. Here is a review of my favorite product analytics tools and their relationship with AMP.

AMP’s path to a better page experience is minimalism. This minimalism makes it harder, maybe even impossible, to use some product analytics tools and features. My go-to product analytics set of tools used to be: Google Tag Manager, Mixpanel, Google Optimize, FullStory, and of course Google Analytics.

Let’s see how does AMP play with each one of them, if it does it all.

Product analytics tools and AMP

Google Tag Manager

First, the traditional switchboard – Google Tag Manager. GTM has a special AMP container type, and as AMP itself – it is quite minimalistic. The selection of tag types, triggers, and variables on a GTM AMP container is very limited. As for triggers, you get 5 of them: Click, Page View, Scroll, Timer, and Visibility. This is pretty constraining. For example, I used to capture every link click, and pass the link href and text in the event’s properties, to later be able to filter them easily. You can’t do it with AMP and GTM anymore. You must define each specific click type with its own event. You can still do it bypassing GTM, though.

Another big constrain is the absence of the Custom HTML tag type. You can’t anymore send events to platforms that don’t have built-in GTM support. In my case, it means I can’t use GTM to send events to FullStory and Mixpanel.

But AMP actually supports more vendors (tag types) and triggers than GTM does – that means that when using AMP there is a need to bypass GTM.


This one is short. As of the time of writing Mixpanel doesn’t support AMP. You can read the latest updates here.

So Mixpanel is a no-go with AMP. Luckily, Some other analytics vendors do support AMP, they are listed on the AMP official site. Amplitude is a Mixpanel alternative that supports AMP, and it has a nice free plan.


FullStory is a great session recording analytics tool. This is from FullStory support, about AMP support:

“AMP explicitly forbids any third-party scripts, so that would mean it’s not possible to capture this activity through FullStory. This is due to the way that AMP specifies analytics vendors to receive page visits, events, etc. Alas, we don’t see any mechanism for adding complex scripts to the pages. We do have this on our radar, but have not yet seen any evidence that they’ll allow anything more complex than static receivers for pre-defined events.”

FullStory Support Agent

Hotjar, a FullStory alternative, includes AMP in its list of Platforms and Frameworks not Compatible with Hotjar, because they “don’t support custom third-party JavaScript”. So, at least for now, it seems that using visual session recording analytics with AMP wouldn’t be possible.

Google Optimize

Google Optimize is a great A/B testing tool (and other kinds of comparison testings). Usually, it is a treat to work with. When AMP involves, it becomes much less of a treat.

While Google Optimize does have AMP support, things are much more complicated. Basically, you need to set up the experiment both on the Google Optimize site and on your own site, using the <amp-experiment> component and JSON. Both setups must match in specific ways. Also, Google Optimize’s visual editor doesn’t seem to work with AMP, so you need to add the variants’ CSS to your site’s code, using special selectors.

You can read more about it here:

Hybrid AMP sites

If your site produces AMP only on some pages or only on mobile, things become even messier. You need to consider and implement continuity of the data. The Site Kit by Google WordPress plugin does part of the heavy lifting, but only part of it.

Final thoughts and considerations

Most of the product analytics work becomes much more difficult with AMP. Some of it, that is visual session recording, totally impossible.

The aim of both AMP and product analytics work is to produce a better product experience. If they can’t live peacefully together, where the compromise should be made?

One option for visual session recording is to manually disable AMP on a specific page when you focus on investigating and improving it and re-enabling AMP when you’re done, until the next time.

Was the post helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: