Clicky

  1. Home
  2. How To
  3. How to Add Google Analytics to AMP

How to Add Google Analytics to AMP

In today’s Blogging world publishing and understanding the audience is a heart to right articles and creating the royal readers. There should be KEY to understanding the behavior of the audience. So, AMP includes an amp-analytics element that allows publishers to track and view the behavior of visitors on the website. The publisher can automatically track visitor counts, Clicks, New Vs Returning and much more on AMP pages.

How to Add Analytics to AMP

Login to Google Analytics Account –> Go  to ‘Home‘ tab –> Copy Google Analytics Code

Login to WordPress Dashboard –> Navigate to AMP (This opens the AMP settings Panel) –>Settings -> Analytic  ->Enable “Google Analytics” option Paste the ID in Tracking ID Section –> Click on the “Save Changes” button.

That’s it; Now you can Track visitor counts, Clicks, New Vs Returning and much more on AMP pages.

Once you have added then you can also check that in your source code of the AMP pages like this screenshot.

How to Add Analytics to AMP (Video)

That’s it for this tutorial!

We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.

Ask your Questions Directly!
If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!
Updated on February 14, 2020

    Are you still looking for a solution?

    Then fill out the below form and we will reach out to you within a few hours.

    Was this article helpful?

    Related Articles

    Comments

    1. Analytics is not tracking AMP views on my website, though i followed all the process and copied and pasted the code too.

    2. Hi! I recently enabled Google Analytics tracking in the AMP plugin and I’m seeing lots of /amp pages in analytics.
      Question: Before I enabled this, were amp page views showing up in GA as regular page views or were they not showing up at all? (ie. was there amp traffic to my blog that I just didn’t know about until I enabled analytics, or is it just that I can now see where it is coming from)
      Thank you so much!

    3. Hello.
      I followed the instructions but have not GA tracking,could you help me to fix it please. My web site is: https://www.senderismoeuropa.com/amp/
      and this is the error that the Console shows:

      Powered by AMP ⚡ HTML – Version 2012232217000 https://www.senderismoeuropa.com/amp/
      log.js:258 [AmpAnalytics analytics1] No triggers were found in the config. No analytics data will be sent.
      http://www.senderismoeuropa.com/:1 The resource https://cdn.ampproject.org/v0/amp-story-player-latest.js was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
      DevTools failed to load SourceMap: Could not parse content for https://www.senderismoeuropa.com/ww.js.map: Unexpected token < in JSON at position 0

    4. How can i add Adobe page view tracking code ? There is option for that, please suggest.
      Thanks

    Leave a Comment