• About
    • History of Dallas SEO
    • SEO Expert Witness Service
  • Contact
  • Topics
    • Bing
    • Blogging
    • Branding
    • Domain Names
    • Google
    • Internet Marketing
    • Link Building
    • Local Search
    • Marketing
    • Public Relations
    • Reputation Management
    • Search Engine Marketing
    • Search Engine Optimization
    • Search Engines
    • Social Media
    • Tech
  • Advertise
  • Email Newsletter

Bill Hartzer

Bill Hartzer on Search, Marketing, Tech, and Domains.

SEMrush

Home » Google » Google Flags Google Analytics Code as Critical Error in AMP Pages

Google Flags Google Analytics Code as Critical Error in AMP Pages

Posted By Bill Hartzer on June 25, 2017at 10:07 am

Google amp error

On my site, this site, I want to track how many visitors are coming to my site’s AMP pages. I use the official WordPress AMP plugin, the one that’s officially endorsed by Google. After installing the plugin, or updating it, I edit the code and add the Google Analytics code. This has been handy for me because of the fact that someone clicking on one of my posts in the Google search results that’s an AMP version won’t visit my site. They won’t visit my domain name, because Google is caching my AMP content. The only way to see how many visitors are seeing my AMP content is by putting the Google Analytics tracking code on my AMP pages. Makes sense, right?

Well, apparently Google doesn’t like it. Their own internal tools flag the Google Analytics code (THEIR CODE), which is JavaScript, and they don’t want it there.

Error in AMP Pages

Looking at my AMP errors, and there are 543 of them (543 pages have this same error on them), I clicked a sample error and see the above message.

Then, running Google’s AMP test, Google flags their very own code as an error. It’s flagged as “Error in AMP Pages”.

Error in AMP Pages

So, I get the fact that, technically speaking, JavaScript code, added by a user (me) is not allowed in the AMP code in order for it to be compliant. But this, frankly is a bit absurd. I’ll live with the error, in this case, because Google won’t give me any data about how many people visit my AMP pages. I just hope that because of the error, they’re not showing my AMP pages in search results as often. If I take the Google Analytics code out of the AMP pages, my content might be shown more to users. How ironic.

Related Posts:
  • 47 TakeAways from Google's John Mueller's AMA on Reddit47 TakeAways from Google's John Mueller's AMA on Reddit
  • 56 Takeaways from Google's Gary Illyes' AMA On Reddit56 Takeaways from Google's Gary Illyes' AMA On Reddit
  • Google Penalty Recovery Service by SEO Expert Bill HartzerGoogle Penalty Recovery Service by SEO Expert Bill Hartzer
  • Bill Hartzer SEO ConsultantBill Hartzer SEO Consultant
  • Google My Business Websites Can Overwrite Local Business URLs, Site Not OptimizedGoogle My Business Websites Can Overwrite Local…
  • Google My Business Bug Causes 404 Errors on WebsitesGoogle My Business Bug Causes 404 Errors on Websites

Filed Under: Google

About Bill Hartzer

Bill Hartzer is CEO of Hartzer Consulting, LLC, an SEO Consulting firm that includes services such as search engine optimization, technical SEO audits, domain name consulting, and online reputation management.

You May Like: Bill Hartzer’s Recent Posts

  • Digital Marketing with Bill Hartzer Podcast December 12, 2019
  • Sales Calls Selling Amazon Alexa Voice Search Listings December 12, 2019
  • Influencer Gets 14 Years in Federal Prison for Hijacking Domain Name December 10, 2019
  • Results of Removing My Google My Business Listing December 2, 2019
  • Google AdSense Sunsetting iOS and Android Apps November 18, 2019
  • Network Solutions Suffers Data Breach in 2019 November 1, 2019
  • State of Search Digital Marketing Conference November 4-5, 2019 October 30, 2019
  • Google My Business Congratulates Local Biz for Getting 1 Click October 20, 2019
  • Google Indexing, Ranking Bing Search Results and Redirects October 18, 2019
  • Yahoo Groups Shutting Down December 14, 2019 October 16, 2019
  • Google My Business Bug Causes 404 Errors on Websites October 13, 2019
  • Bill’s List: Speakers to See and Meet at Pubcon Las Vegas 2019 October 5, 2019
  • Google Bulletin is Shutting Down September 25, 2019
  • How to Protect Your Google Account with Google Advanced Protection September 21, 2019
  • Fake Conference Attendee Contact Lists Being Sold September 13, 2019
  • Google Says Goodbye to Old Google Search Console September 9, 2019
  • US Govt. Social Media Keyword Watch List: Don’t Use These Words on Social Media Posts September 5, 2019
  • How Expired Domain Names Are Used for PBNs, Rebuilds, and Redirects August 29, 2019
  • Do You Have the Legal Right to be Listed in Google? August 23, 2019
  • What Happened When I Removed My Google My Business Listing August 4, 2019

DFWSEM logo

Jim & I are the original Founders of the Dallas/Ft Worth Search Engine Marketing Association.

Bill Hartzer is a Brand Ambassador for:



Industry Friends

WTFSEO
SEO By the Sea
WordPress Website Management
Jeff Lenney

Connect With Bill Hartzer

Bill Hartzer on Twitter
Bill Hartzer on Instagram
Hartzer Consulting on Facebook
Bill Hartzer on Facebook
Bill Hartzer on YouTube


Note: All product names, logos, and brands are property of their respective owners. All company, product and service names used in this website are for identification purposes only, and are mentioned only to help my readers. All other trademarks cited herein are the property of their respective owners. Use of these names, logos, and brands does not imply endorsement.


Hartzer Consulting Technical SEO Consultants

Website, Content, and Marketing by Hartzer Consulting, LLC.
Copyright © 2019 by Bill Hartzer and Hartzer Consulting, LLC.

Disclaimer - Privacy Policy - Terms of Use