• About
    • History of Dallas SEO
  • 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
  • Services
    • Search Engine Optimization
    • Ongoing SEO Services
    • SEO Expert Witness
    • Google Penalty Recovery
    • Mini SEO Audit
    • Link Audit
    • Keyword Research
    • Combine Websites SEO Services
    • PPC Management
    • Online Reputation Management
    • Domain Name Consultant
    • Domain Names & Expired Domains
    • Domain Name Appraisal

Bill Hartzer

GoDaddy Airo: Register your .com domain name today!
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 on June 25, 2017 Written by Bill Hartzer

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

  • Hackers Hijack Google Results: Bybit Exposes AI-Powered macOS Malware Targeting Claude Code Searches
  • Brandpoint: 60% of Google Searches End Without Clicks
  • Google’s New Discover Update Is Live
  • Google Is Shutting Down Its Dark Web Report
  • After Years of Resistance, Google Agrees to South Korea’s Strict Mapping Rules

Filed Under: Google

About Bill Hartzer

Bill Hartzer is the CEO of Hartzer Consulting and founder of DNAccess, a domain name protection and recovery service. A recognized authority in digital marketing and domain name strategy, Bill is frequently called upon as an Expert Witness in internet-related legal cases. He's been sharing his insights, expertise, and research here on BillHartzer.com for over two decades.

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

Hartzer Domains

Bare-Metal Servers by HostDime

DFWSEM logo

 

 

Brand Ambassador for:

Majestic logo

Oncrawl logo

Industry Friends

  • David Daniels
  • WTFSEO
  • SEO By the Sea
  • Jeff Lenney
  • Jeff Gabriel
  • Scott Hendison
  • Dixon Jones
  • Brian Hartzer
  • Navah Hopkins
  • DNAccess
  • SEO Dallas
  • Confirmed Stolen
  • Hartzer on IT.com
  • Jason Olson

Connect With Bill Hartzer

  • Bill Hartzer on X
  • Bill Hartzer on BlueSky
  • Bill Hartzer on Instagram
  • Hartzer Consulting on Facebook
  • Bill Hartzer on Facebook
  • Bill Hartzer on YouTube

Recent Posts

  • New Data: AI Visitors Sign Up 11x More Than Google Traffic
  • Businesses Fired the Human Overseer From Their AI. New Data Shows How Fast It Happened
  • When a Web Developer Holds Your Domain Name Hostage: “You Didn’t Pay Me” Is Not a Defense
  • Forget the Design Team: One URL Now Builds a Full Set of Ads
  • What People Actually Ask Before Turning a Video into an MP3
  • ChatGPT Just Beat Google at Sending Businesses Their Hottest Leads, 70 Million Calls Prove It
  • Which AI Model Should You Use? A Practical Guide by Task
  • Legal Tech Media Group Bets Big on AEO
  • The Domain Name Gap: What GoDaddy’s 2026 Most Entrepreneurial Cities List Reveals About Digital Presence in America’s Growth Markets
  • Remembering Bruce Clay: The Father of SEO and a Friend Who Changed an Industry
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

Website, Content, and Marketing by Hartzer Consulting, LLC.
Disclaimer - Privacy Policy - Terms of Use - AI Instructions

Copyright © 2026 ·