AMP Fixed Google Analytics Does Not Work

Analytics code is not being fully fetched, rendering it useless. Had to add the code manually to the end of the PAGE_CONTAINER_AMP.

analytics.png

Here is the result:

upload_2017-4-10_10-45-51.png
 
Last edited:
This is what is recommended:

Code:
<amp-analytics type="googleanalytics">
<script type="application/json">
{
  "vars": {
    "account": "UA-XXXXX-Y"
  },
  "triggers": {
    "trackPageview": {
      "on": "visible",
      "request": "pageview"
    }
  }
}
</script>
</amp-analytics>

This is what the code is actually adding to the page:

Code:
<amp-analytics type="googleanalytics" id="UA-88368249-2"></amp-analytics>
 
It wasn't marked fixed because it wasn't addressed yet. I was unable to reproduce this issue, hence why it was left unresolved.

For the avoidence of doubt, anything in Bug Reports is unresolved and everything in Resolved Bug Reports is sorted.
 
I just checked your site, @Recep Baltas

xTj58ij.png


Did you add this manually?
 
Back
Top