• About
    • History of Dallas SEO
    • SEO Expert Witness Services
  • 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.

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.

Filed Under: Google

About Bill Hartzer

Bill Hartzer is CEO of Hartzer Consulting, an SEO Consulting firm that includes services such as search engine optimization, technical SEO audits, domain name consulting, and online reputation management. As an SEO Expert, Mr. Hartzer frequently serves as an SEO Expert Witness and Domain Name Expert Witness in legal cases worldwide. He also oversees DNAccess.com, a company that provides brand protection and monitoring, domain name background checks, and stolen domain name recovery services.

Recent Posts

  • Atly Unveils ‘Ask Around’ Tool, Empowering Influencers to Gather and Share Recommendations from Followers September 29, 2023
  • RedKangaroo Launches World’s First “Organic Growth” Marketing Platform Leveraging Social Media September 29, 2023
  • SmarTek21’s IntelliTek SearchAI September 29, 2023
  • ICANN Marks 25 Years September 28, 2023
  • AI Content Generation Market Projected to Reach $5.958 Billion by 2029 September 6, 2023
  • Indigo Ransomware Attack Impacted SEO, Led to Lost Revenue August 14, 2023
  • Internet Corporation Listing Service Invoice – Fake Invoice Scam August 8, 2023
  • Someone Stole My Domain Name: Here’s What You Do August 8, 2023
  • Pulsr: First AI Search Engine for NFTs Launches July 27, 2023
  • 2023 TechBehemoths Survey: SEO is Most Effective Method for Lead Gen July 13, 2023
  • Meta Launches Threads, Twitter Sends Cease and Desist Letter July 6, 2023
  • Squarespace Acquires Google Domains June 15, 2023
  • How to Submit Spammy, Deceptive, and Low Quality Web Pages to Google June 14, 2023
  • New HIPAA-Compliant Google & Facebook Campaign Tracking Available June 13, 2023
  • Google Search Engine Class Action Settlement: Google Referrer Header Privacy Litigation June 5, 2023
  • I Asked Twitter for SEO Advice. Here’s What They Said June 1, 2023
  • Web.com Launches AI Domain Name Generator and AI Writer Tools May 31, 2023
  • Artlist Launches AI-Powered Footage Search Engine May 30, 2023
  • Google’s Search Generative Experience According to Google Bard May 22, 2023
  • Is AIO the New SEO? May 10, 2023

Hartzer Domains

US Agency Awards Judge

DFWSEM logo

Bill Hartzer is a Brand Ambassador for:



Industry Friends

I Love SEO
WTFSEO
SEO By the Sea
Jeff Lenney
Jeff Gabriel
Scott Hendison
Dixon Jones
Brian Hartzer
Navah Hopkins
DNAccess
SEO Dallas

Connect With Bill Hartzer

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

Categories

  • Advertising (19)
  • AI (2)
  • Bing Search Engine (6)
  • Blogging (42)
  • Branding (12)
  • Domain Names (215)
  • Google (241)
  • Internet Marketing (27)
  • Internet Usage (85)
  • Link Building (53)
  • Local Search (39)
  • Marketing (183)
  • Marketing Foo (30)
  • Pay Per Click (3)
  • Podcast (18)
  • Public Relations (8)
  • Reputation Management (9)
  • Search Engine Marketing (44)
  • Search Engine Marketing Events (48)
  • Search Engine Marketing Firms (19)
  • Search Engine Marketing Jobs (33)
  • Search Engine Optimization (166)
  • Search Engines (208)
  • Social Media (197)
  • Tech (7)
  • Web Analytics (17)
  • Webinars (1)

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.

Copyright © 2023 ·