Analytics
4.1K members online now
4.1K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Need help to track AMP pages in GA

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

I need a help in regards to tracking an AMP pages in GA.

I had placed this code in all the amp web page but then to my pages are not getting track, kindly help!

Below is the code:

In head 

<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>

 

and in Body

<amp-analytics type="googleanalytics">
<script type="application/json">
{
"vars": {
"account": "UA-52150157-1" /*replace with your GA tracking id*/
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
}
}
}
</script>
</amp-analytics>

 

Please help it is bit urgent.