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.
Hooray, and we have decent Piwik Analytics support too since 0.8.7.
Much thanks for the hard work!
Here’s my write up: http://www.elftronix.com/guide-to-using-piwik-analytics-with-amp-on-wordpress/
Thank you so much!
any indication for it actually working?
I mean the code is there- but tag assistant doesn’t see it.
and there is a rumour going around duplicate content etc…
where can i find additional info?
Hi John,
The Google Tag assistant does not detect the AMP pages because it does run with Javascript and AMP doesn’t allow it to do.
But that doesn’t mean that its not working. It will still work perfectly.
Regards,
Ahmed
Started with amp booooom traffic increase by 200%
http://trendsreviews.com
Pingback: AMP - An Overview [Set-up, Pros & Cons] - The Digital Mind
I added the official amp plugin. Is it a problem if I remove it and add your plugin?
Hi Burhan,
There is no problem if you remove the official amp plugin and add our plugin.
I have my GA script added as this guide notes, but It’s not showing up on the site and the traffic is not being reported within GA. I’m also getting this error within Chrome console. Are these related? How can I fix this?
Powered by AMP ⚡ HTML – Version 2001071857360 https://tap.fremontmotors.com/amp
amp:1 Access to fetch at ‘https://www.googletagmanager.com/amp.json?id=GTM-K4WMZRG&__amp_source_origin=https%3A%2F%2Ftap.fremontmotors.com’ from origin ‘https://tap.fremontmotors.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.
http://www.googletagmanager.com/amp.json?id=GTM-K4WMZRG&__amp_source_origin=https%3A%2F%2Ftap.fremontmotors.com:1 Failed to load resource: net::ERR_FAILED
log.js:252 [AmpAnalytics ] Error loading remote config: https://www.googletagmanager.com/amp.json?id=GTM-K4WMZRG Error: XHR Failed fetching (https://www.googletagmanager.com/…): Failed to fetch
at ab (log.js:715)
at Xa.f.createExpectedError (log.js:364)
at xhr-impl.js:111
at async Promise.all (index 0)
Za @ log.js:252
log.js:252 [AmpAnalytics ] No request strings defined. Analytics data will not be sent from this page.
Za @ log.js:252
log.js:252 [AmpAnalytics ] Ignoring request for event. Request string not found: pageview
Hi Infotel,
It has been blocked by the CORS policy. Cors Policy allows on your server if you don’t know how to do this then contact your hosting company they will fix this issue.
My AMP is no longer tracking GA on my mobile pages. I don’t know because the problem started after I updated the AMP plugin.
Hi Offorma Miracle,
Will you please provide us exact URL where you are having an issue so that we can check and fix it immediately.
Techyloud. com that is the link.
Based on Google’s help docs, you create a separate property for AMP pages. Does this follow that same advice or we use the same property for the traditional web property?
Hi Marketing Introvert,
Will you please contact our technical team from here- https://ampforwp.com/support/ they will help you as soon as possible.
Hi, Thanks for tips now it’s working well on my website at https://torrents-proxy.com/ and I need more suggestions on how I can set up custom ads on the post.
I was unable to use ampforwp on my https://www.latesttechno.in/, please share some information on how to properly setup all functions of ampforwp.
Hi Jay Rajput,
Will you please contact our technical team from here- https://ampforwp.com/support/ they will help you as soon as possible.