• eaglejohn

    (@danielbenjamins)


    When I add the below code to the AMP > Analytics field, the AMP validator gives me an error/warning that the JSON can’t be parsed correctly. This is considered an error in Google Search Console as well. Any suggestions for the right analytics code?

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

  • The topic ‘AMP analytics JSON error’ is closed to new replies.