How to Fix AMP Issue User-authored JavaScript Found on Page

220

In this article I will show you how to fix AMP issue user-authored JavaScript found on page as it’s critical. Although it’s critical and a lot of people come across with it, I couldn’t find detailed solution to this online. As I’ve mentioned various times in my previous articles, I don’t have coding knowledge. Having a little knowledge on WordPress, I was very hesitant about using Accelerated Mobile Pages. However, every online source recommends it for SEO purposes, so I felt obligated.

SEE ALSO: Can You Make Money for Living from Blogging?

In the beginning, applying AMP was very convenient using AMP Plugin as it was all automated. However, one day I have come across Critical AMP issue User-authored JavaScript found page on search console. Due to lack of technical knowledge, I started to look into online resources which didn’t help either. So, I decided to get rid of Accelerated Mobile Pages to make sure I wouldn’t deal with more issues. However, developers have updated the WordPress Theme we use for PlatoPost News and added AMP Plugin feature. Once it’s provided by theme developers, I decided to give it one more shot. In just couple of days, my AMP section in search console was filled up with same issues.

List of Critical AMP Issue on Search Console

First, I contacted theme developers to make sure if the problem caused by the theme codes. I received an explanatory email saying it has nothing to with the theme codes with attached photos. The main difference was the place where we validated AMP features. I’ve used Google’s “Test Page” section in the search console, but everything seemed fine. However, the theme developers used AMP Validator which was able to spot the actual problem in the codes. At this point, I was able to realize problem and fix it.

AMP-Validator-User-Authored-JavaScript-Issue-Found

Let me explain how I was able to fix AMP Issue User-authored JavaScript Found on Page without coding knowledge.

According to AMP Validator, the code in Line 250 was the issue with user-authored JavaScript. Therefore, here is the line of the code:

<script>’undefined’=== typeof _trfq || (window._trfq = []);’undefined’=== typeof _trfd && (window._trfd=[]),_trfd.push({‘tccl.baseHost’:’secureserver.net’}),_trfd.push({‘ap’:’cpsh’},{‘server’:’p3plcpnl0923′}) // Monitoring performance to make your website faster. If you want to opt-out, please contact web hosting support.</script><script src=’https://img1.wsimg.com/tcc/tcc_l.combined.1.0.6.min.js’></script></html>

As the code itself stated, the speed monitoring feature of the hosting was the main problem to critical AMP issue. Most likely, you are also using GoDaddy as your hosting provider and their speed-monitoring feature isn’t friendly with AMP. Relying on the information nested in the script, I have contacted GoDaddy support and stated my problem.

SEE ALSO: Top 5 Things you must know before Starting a Blog

In short period of time, they were able to respond to my request and opt me out of monitoring feature. However, I have found out that I didn’t have to spend time on GoDaddy Support to fix this issue. I could fix it easily through my cPanel.

Check the section below to learn how to fix AMP Issue User-authored JavaScript Found on Page from GoDaddy cPanel

GoDaddy cPanel fix AMP Issue Step 1
Once you login your GoDaddy cPanel, there are three dots right next to cPanel Admin Button. Click to three dots and then click “Help Us” in the pop-up menu.
GoDaddy cPanel Opt Out from Monitoring Feature-min
Once you click “Help Us”, there will a new pop-up window. If monitoring is active, you can click Opt out button to end it. Remember, you can do this only once in 24 hours, so make sure you are doing it right.

Once you opt-out monitoring from GoDaddy server, your accelerated mobile pages should work fine. You can always go back to AMP Validator to test your pages. Here is my result after fixing critical AMP issue user-authored JavaScript found on page.

AMP Validator Page Passed the Test-min

User-authored JavaScript Found on Page