AMP Utilizing Google Analytics/Tag Manager

So when you turn on AMP for your pages, your Google Tag Manager script gets wiped out. If you rely on this for your organization's analytics needs, this is hugely problematic. GTM implemented an AMP container recently that leverages the analytics module within AMP. Without having this capibility, or the ability to do any sort of advanced edits on the AMP rendering, I cannot use the AMP feature.

10 Replies
Occasional Contributor | Diamond Partner

Really hepful!

New Contributor | Platinum Partner

Has anyone found a way to edit AMP pages within HubSpot so we can add analytics to the pages?

New Contributor

I also use a custom GA tracking code (like displayfeatures and linker plugin) so we cannot use the Integration GA option in the COS settings.


I have AMP enabled and there is not tracking for AMP. I tried talking with support and they didn't help. They pointed me here.


I think the Blog -> Google AMP section should have a "Integration with Google Analytics" option added. This would allow the GA code to track the AMP correctly. 

New Member

 Same problem occured. I have added AMP GTM codes to <head> <footer> and <body> but GA doesn't see AMP visits. Has anyone now to fix? Hubspot support?

Regular Contributor | Platinum Partner

Much needed! Specially for those customers of ours that track everything in rely GTM and view that as their single source of truth.

New Contributor

I ended up disabling the AMP all together and wrote my own AMP so I could do the tracking I needed.

New Contributor

We too have disabled AMP pages because we are unable to accurately track their performance via GA. 

I'd be interested to see how HubSpot react to the recent news about the Google page experience update and this using AMP version for scoring. , . 


It would be great to have a section to adjust tracking based on Google best practice


Regular Contributor


Regular Contributor

Hubspot are there any updates on making this happen? It's been 3 years, and Googles Web Vitals have become a very important ranking factor. AMP pages are becoming neccessary to compete. Have the ability to integrate tag manager or analytics using AMP would be AMAZING and a GAME CHANGER!

New Member

If you insert personalized JavaScript code in an AMP page it will not be indexed in google!


I cant add the analytic script or the script for hubspot forms.
It is very important to solved this ASAP