Title: Error &quot;script&quot; with Google search console
Last modified: August 31, 2016

---

# Error "script" with Google search console

 *  [e-commerce-concept](https://wordpress.org/support/users/e-commerce-concept/)
 * (@e-commerce-concept)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/error-script-with-google-search-console/)
 * Hello,
    I have some errors from GSC : Errors unknown syntax: script URL de page
   AMP : [http://e-commerce-concept.eu/chiffres-referencement/amp/](http://e-commerce-concept.eu/chiffres-referencement/amp/)
   URL canonique : [http://e-commerce-concept.eu/chiffres-referencement/](http://e-commerce-concept.eu/chiffres-referencement/)
   Last détection : 21/03/2016
 * Thank you for your help
 * [https://wordpress.org/plugins/amp/](https://wordpress.org/plugins/amp/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  [neotrope](https://wordpress.org/support/users/neotrope/)
 * (@neotrope)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202365)
 * Error likely from the google analytics “script” in there (view your page source
   and look for “script” – hint hint ! ) 😉
 * See the AMP docs for how to properly embed Google analytics for AMP pages.
 * Might not be the solution, but that was my first ‘guess’ looking at your page
 * (( I don’t work here . . . ))
 *  [lamvt](https://wordpress.org/support/users/lamvt/)
 * (@lamvt)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202422)
 * let’s try to use [https://wordpress.org/plugins/custom-amp-accelerated-mobile-pages/](https://wordpress.org/plugins/custom-amp-accelerated-mobile-pages/)
   
   1.0.5
 *  Release Date – March 26, 2016 *
    Fixed Validation AMP HTML Erros: The tag ‘script’
   is disallowed except in specific forms
 *  Thread Starter [e-commerce-concept](https://wordpress.org/support/users/e-commerce-concept/)
 * (@e-commerce-concept)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202456)
 * thank you, i test this on another website, and i return to you when GG is passed
 *  [lordzden](https://wordpress.org/support/users/lordzden/)
 * (@lordzden)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202458)
 * [@lamvt](https://wordpress.org/support/users/lamvt/): I am currently using the
   AMP plugin but I can see that your plugin has promising features.
 *  [kimstuart](https://wordpress.org/support/users/kimstuart/)
 * (@kimstuart)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202482)
 * neotrope –
 * yep, that’s likely it. I just spent a half hour searching through the source 
   view on one of our sites that’s getting script errors and the ONLY thing I could
   find was the GA scripting that wasn’t formatted properly when I matched up each
   of the items with the AMP requirements.
 * Off to let the author know
 *  [lordzden](https://wordpress.org/support/users/lordzden/)
 * (@lordzden)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202532)
 * I have no problems with the GA script using the AMP plugin. Did you disable the
   plugins that might carry the GA script or check your theme options?
 * You may check also this resource: [https://asknoypi.com/accelerated-mobile-pages-validator/#unknownsyntaxerror](https://asknoypi.com/accelerated-mobile-pages-validator/#unknownsyntaxerror)
 *  Thread Starter [e-commerce-concept](https://wordpress.org/support/users/e-commerce-concept/)
 * (@e-commerce-concept)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202538)
 * Hello,
    I have all tested. WP : 4.42 fr Theme : Twentyfourteen child.
 * My website has :
    AMP v0.32 Yoast V3.1.2 WP Super Cache V 1.4.8 Glue for Yoast
   AMP V0.3.2 Custom AMP V1.0.6 And result in GSC : 0 indexed page 5 error in syntax‘
   script’ 1 error in amp-custom
 * url test : [http://pizzamoon-castelnau.com](http://pizzamoon-castelnau.com)
    
   All is in place since 1 week. I am going to search another plugin
 *  Thread Starter [e-commerce-concept](https://wordpress.org/support/users/e-commerce-concept/)
 * (@e-commerce-concept)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202539)
 * And in my other website : [http://e-commerce-concept.eu/](http://e-commerce-concept.eu/)
 * 1 month ago : 15 indexed AMP pages and 0 error
    Now : 3 AMP indexed pages and
   7 errors
 * WP 4.4.2 fr
    Theme : Lingonberry Extensions : AMP Glue AMP for Yoast Yoast WP
   super cache
 * This plugin is Ok in 1 website ? with no error ?
 *  [lordzden](https://wordpress.org/support/users/lordzden/)
 * (@lordzden)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202540)
 * I checked this website: [http://pizzamoon-castelnau.com/salades-tarifs/amp/](http://pizzamoon-castelnau.com/salades-tarifs/amp/)
 * If you view the source code on AMP you will see this code:
 *     ```
       <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
         m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
         })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
   
         ga('create', 'UA-52131014-1', 'auto');
         ga('send', 'pageview');
   
       </script>
       ```
   
 * Can you recall how did you add this code on your website?
 *  Thread Starter [e-commerce-concept](https://wordpress.org/support/users/e-commerce-concept/)
 * (@e-commerce-concept)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202541)
 * Yes, it come from GG Analytics : universal analytics code
 * Why, there is a problem with this code ?
 * Thanks for your help
 *  [jmonteil](https://wordpress.org/support/users/jmonteil/)
 * (@jmonteil)
 * [10 years ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202586)
 * Hi, I have the same issue with the GA Universal Code. Does someone have a solution
   to fix this ?
 * Thanks
 *  [jmonteil](https://wordpress.org/support/users/jmonteil/)
 * (@jmonteil)
 * [10 years ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202588)
 * Hi,
 * It appears that we cannot use analytics.js on AMP pages, as explained there :
   [https://support.google.com/analytics/answer/6343176?hl=en](https://support.google.com/analytics/answer/6343176?hl=en).
 * But my entire website uses analytics.js. So I installed the plugin Custom AMP
   from Lamvt. It allows you to add amp-compatible analytics tags in your AMP pages.
 * But the problem is the old analytics.js tag remains. Does any of you has a solution
   to only delete this tag on AMP pages ?
 * Thanks,
 * Joffrey
 *  [jmonteil](https://wordpress.org/support/users/jmonteil/)
 * (@jmonteil)
 * [10 years ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202589)
 * Nobody ? :/

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Error "script" with Google search console’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 13 replies
 * 6 participants
 * Last reply from: [jmonteil](https://wordpress.org/support/users/jmonteil/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/error-script-with-google-search-console/#post-7202589)
 * Status: not resolved