My email from Google says:
Info: Invalid structured data element
Fix the structured data element in your page. AMP pages with an invalid structured data element may appear in Google Search results without some AMP-specific features. Find out more
1
Fix the structured data element in your page
Review the documentation for the relevant structured data element.
See Requirements
2
Verify the structured data element
Open the structured data testing tool and verify that no errors exist for this page.
Open Test Tool
-
This reply was modified 9 years, 6 months ago by
stevepett.
Hi:
I am getting this error:
Remove any custom JavaScript code from your page
I run the AMP post in question and the code that Google is referring to is:
<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-XXXXXXXXX’, ‘auto’);
ga(‘send’, ‘pageview’);
</script>
This is google’s own analytics code.
How do I set the plugin to not add this on the AMP posts?
I am using the “SEO by SQUIRRLY” plugin that adds the google analytics code to the post. Is this really an issue with this plugin?
Many Thanks,
-
This reply was modified 9 years, 6 months ago by
purplehazemarketing. Reason: fix spelling errors
Hey,
You can remove the Google Analytics code from Squirrly and instead use a plugin that provides AMP support for Google Analytics.
For the next Squirrly version, we’ll have support for AMP as well. For the moment, it’s not a Squirrly issue.
Thank you for the feedback!
Regards,
Sorel