AMP Google Analytics

Posted in: Newspaper
Post count: 38

I have inserted below mentioned code for Google Analytics in Newspaper Theme panel > AMP > Analytics.

<amp-analytics type=”googleanalytics”>
<script type=”application/json”>
{
“vars”: {
“account”: “UA-XXXXXX-X”
},
“triggers”: {
“trackPageview”: {
“on”: “visible”,
“request”: “pageview”
  }
 }
}
</script>
</amp-analytics>

But still I am unable to track AMP traffic in Google Analytics.

Post count: 623

Hello @thecrazybuyersblog
Use following code:
Note: Replace UA-123456789-1 with your tracking ID

{
"vars":{
"account":"UA-123456789-1"
},
"triggers":{
"trackPageview":{
"on":"visible",
"request":"pageview"
}
}
}

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.