Fixing AMP Validation Errors

FIXING AMP VALIDATION ERRORS CAN FEEL LIKE SCALING EVEREST!

Don't Give Up Hope - There Is An Answer! Have You Experienced:

HTML Errors

Your AMP validation error points to the fact that your html is incorrectly configured.

Google Analytics

Your Google Analytics code is in Javascript which is not allowed in AMP

AMP-Validation-Error
No Loading

Sometimes the AMP version of your site just won't work!

Poor Design

The AMP won't fit the page, or, it just looks terrible

"Don't Give Up, I've Been Through The Same Problems...Here's What I Learnt"

Here's What To Do

Believe it or not, I experienced all of the above problems when I installed AMP on my web design site. It took heaps of research, and trial and error to diagnose what was wrong, and how to fix it!
Finally, it came down to two solutions:
1/ Change The AMP Plugin I was using(the old one didn't address the issues adequately)
2/ Examine my SEO plugins.
So, dealing with the first issue, I had actually tried two AMP plugins. However, both failed to address my AMP validation errors. I actually received 100% validation errors with both plugins! Youch!! I finally found, though, a plugin that was more easily to configure. It actually cleared up the HTML errors without any extra input from me. The plugin is called Better AMP plugin. Click on the name, and it will take you to the WordPress page that explains more about it.
At this point, I thought I was home dry. And, intially, the AMP validation tool I was using did give me a 'Pass'. However, when I went to my deep links they all came back with a 'Fail'. This wasn't because of the HTML errors, no, they had been cleaned up. What the issue was, this time, was the Google Analytics code. That kind of script is not allowed in AMP. So, how to delete it?
Since the 'Better AMP' plugin had cleaned up the HTML errors, I tried entering the analytics code into their Customize screen. This didn't work, so I went back and looked at where the error appeared in the code. The code error appeared above my Squirrly SEO annotation. This was something I hadn't really considered to be an issue as I had already disabled the analytics for AMP in Yoast. But, after finding the analytics entry in my Squirrly plugin, I was able to delete it, and this resolved the error.
Google is still able to track the traffic, because the analytics code is elsewhere, so there was no problem as yet from doing this. However, after that simple change, this is what I got from the AMP validation:
AMP-validation-error-pass
So, if you are getting AMP validation errors, the problem can kind of feel like it's akin to climbing everest. But, you know, listening to someone who's been through the same problem can level the ground, so to speak. I hope my experience in this matter will help!
Regards
Simon
Please follow and like us:
Simon Harrison
Simon Harrison

With a Diploma in Sales, a Diploma in Digital Marketing as well as many other web related certificates, I am an experienced London Web Designer who has worked with many sites and businesses. Since 1998, I have helped create, grow and sell many businesses, and can help you achieve your goals

No Comments

Write a Reply or Comment

Your email address will not be published. Required fields are marked *


WhatsApp us