Title: AMP analytics JSON error
Last modified: November 3, 2018

---

# AMP analytics JSON error

 *  [eaglejohn](https://wordpress.org/support/users/danielbenjamins/)
 * (@danielbenjamins)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/amp-analytics-json-error/)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/glue-for-yoast-seo-amp_ddbb3a.svg)
 * [Glue for Yoast SEO & AMP](https://wordpress.org/plugins/glue-for-yoast-seo-amp/)
 * [Support Threads](https://wordpress.org/support/plugin/glue-for-yoast-seo-amp/)
 * [Active Topics](https://wordpress.org/support/plugin/glue-for-yoast-seo-amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/glue-for-yoast-seo-amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/glue-for-yoast-seo-amp/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [eaglejohn](https://wordpress.org/support/users/danielbenjamins/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/amp-analytics-json-error/)
 * Status: not resolved