• Resolved tomdavis17

    (@tomdavis17)


    I am getting this message in search control. No idea how to fix is. Please help

    An AMP component ‘script’ tag is present more than once in the document.

    This is the code that GSC highlights:
    </script><script src=”https://cdn.ampproject.org/v0/amp-analytics-0.1.js&#8221; async=”” custom-element=”amp-analytics”></script><script src=”https://cdn.ampproject.org/v0/amp-form-0.1.js&#8221; async=”” custom-element=”amp-form”></script><script src=”https://cdn.ampproject.org/v0/amp-mustache-0.2.js&#8221; async=”” custom-template=”amp-mustache”></script><style amp-custom=””>.contact-form input::placeholder{transition:opacity .3s ease-out}.contact-form input:hover::placeholder{opacity:.5}.contact-form input:focus::placeholder{opacity:.3}.contact-form input[type=’text’],.contact-form input[type=’email’],.contact-form input[type=’tel’],.contact-form input[type=’url’]{box-sizing:border-box;margin-bottom:1.5em;width:100%}.contact-form input[type=’radio’],.contact-form input[type=’checkbox’]{float:none;margin:0 .75rem 0 5px}.contact-form input[type=’checkbox’]{top:0;margin-left:0}.contact-form label{margin-bottom:.25em;float:none;font-weight:bold;display:block}.contact-form label span{font-size:85%;margin-left:.25em;font-weight:normal}@media only screen and (min-width: 600px){.contact-form input[type=’text’],.contact-form input[type=’email’],.contact-form input[type=’tel’],.contact-form input[type=’url’]{width:50%}}p:empty:before{content:”?”}amp-img.amp-wp-enforced-sizes[layout=”intrinsic”] > img{object-fit:contain}.amp-wp-default-form-message > p{margin:1em 0;padding:.5em}.amp-wp-default-form-message[submitting] > p,.amp-wp-default-form-message[submit-success] > p.amp-wp-form-redirecting{font-style:italic}.amp-wp-default-form-message[submit-success] > p:not(.amp-wp-form-redirecting){border:solid 1px #008000;background-color:#90ee90;color:#000}.amp-wp-default-form-message[submit-error] > p{border:solid 1px #f00;background-color:#ffb6c1;color:#000}.amp-wp-default-form-message[submit-success] > p:empty{display:none}.alignleft{margin-top:1em;margin-right:auto;margin-bottom:1em;margin-left:auto}.alignleft{float:left}.amp-wp-enforced-sizes{max-width:100%;margin:0 auto}html{background:#0a89c0}body{background:#fff;color:#353535;font-family:Georgia,”Times New Roman”,Times,Serif;font-weight:300;line-height:1.75em}p,ul,figure{margin:0 0 1em;padding:0}a,a:visited{color:#0a89c0}a:hover,a:active,a:focus{color:#353535}.amp-wp-header div,.amp-wp-title,.wp-caption-text,.amp-wp-footer p,.back-to-top{font-family:-apple-system,BlinkMacSystemFont,”Segoe UI”,”Roboto”,”Oxygen-Sans”,”Ubuntu”,”Cantarell”,”Helvetica Neue”,sans-serif}.amp-wp-header{background-color:#0a89c0}.amp-wp-header div{color:#fff;font-size:1em;font-weight:400;margin:0 auto;max-width:calc(840px – 32px);padding:.875em 16px;position:relative}.amp-wp-header a{color:#fff;text-decoration:none}.amp-wp-header .amp-wp-site-icon{background-color:#fff;border:1px solid #fff;border-radius:50%;position:absolute;right:18px;top:10px}.amp-wp-article{color:#353535;font-weight:400;margin:1.5em auto;max-width:840px;overflow-wrap:break-word;word-wrap:break-word}.amp-wp-article-header{align-items:center;align-content:stretch;display:flex;flex-wrap:wrap;justify-content:space-between;margin:1.5em 16px 0}.amp-wp-title{color:#353535;display:block;flex:1 0 100%;font-weight:900;margin:0 0 .625em;width:100%}.amp-wp-article-content{margin:0 16px}.amp-wp-article-content ul{margin-left:1em}.amp-wp-article-content .wp-caption{max-width:100%}.amp-wp-article-content amp-img{margin:0 auto}.amp-wp-article-content amp-img.alignleft{margin:0 16px 1em 0}.wp-caption{padding:0}.wp-caption.alignleft{margin-right:16px}.wp-caption .wp-caption-text{border-bottom:1px solid #c2c2c2;color:#696969;font-size:.875em;line-height:1.5em;margin:0;padding:.66em 10px .75em}.amp-wp-footer{border-top:1px solid #c2c2c2;margin:calc(1.5em – 1px) 0 0}.amp-wp-footer div{margin:0 auto;max-width:calc(840px – 32px);padding:1.25em 16px 1.25em;position:relative}.amp-wp-footer h2{font-size:1em;line-height:1.375em;margin:0 0 .5em}.amp-wp-footer p{color:#696969;font-size:.8em;line-height:1.5em;margin:0 85px 0 0}.amp-wp-footer a{text-decoration:none}.back-to-top{bottom:1.275em;font-size:.8em;font-weight:600;line-height:2em;position:absolute;right:16px}:root:not(#_):not(#_):not(#_):not(#_):not(#_) .amp-wp-cc68ddc{color:#f00}:root:not(#_):not(#_):not(#_):not(#_):not(#_) .amp-wp-b3a15a8{width:100px}:root:not(#_):not(#_):not(#_):not(#_):not(#_) .amp-wp-ebaa9f7{width:144px}:root:not(#_):not(#_):not(#_):not(#_):not(#_) .amp-wp-5443cfc{color:#000}:root:not(#_):not(#_):not(#_):not(#_):not(#_) .amp-wp-cae6213{font-size:14px;color:#000}:root:not(#_):not(#_):not(#_):not(#_):not(#_) .amp-wp-cdd8ca0{text-align:center}:root:not(#_):not(#_):not(#_):not(#_):not(#_) .amp-wp-267f6d5{font-size:14px}

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thanks for reaching out. This notice can occur if an AMP component’s script has been added to your site more than once. In your case it looks like the amp-analytics script has been added twice, maybe once time via a plugin and another if you’ve added any Analytics snippets via the AMP plugins Analytics feature.

    If you’d like us to check your site we can hopefully determine the source of multiple snippets. You can use this form to share your site URL or Site Health information privately if preferred.

    Thread Starter tomdavis17

    (@tomdavis17)

    Hi, thanks for responding, this is my site URL

    https://www.prepaidfuneralreview.co.uk/

    Thanks for sharing. I’ve checked your site and no validation errors exist at present, with only one Analytics script existing as recommended. The information from Search Console may have be stale when you encountered this notice.

    I noticed also you’re using the Astra theme, which is AMP compatible, along with content that is suitable to be served in transitional or standard mode. Have you tried out using either mode on your site? Your AMP URLs perform better than your none AMP as you’ll find below:

    If you wish to remain in reader mode you can also try out once of the different Reader themes. We have a recently produced video on Reader mode you’ll find here.

    Let us know if you have any further questions on this.

    @tomdavis17 Upon further inspection I do see the Analytics script placed on your site. Can you share whether you have the option to allow Site Kit to insert your Analytics snippet on? If so you don’t need to manually include any Analytics snippet within the AMP plugin.

    Plugin Author Weston Ruter

    (@westonruter)

    The AMP plugin should be automatically removing duplicate (and unused) AMP component scripts.

    Thread Starter tomdavis17

    (@tomdavis17)

    @jamesosborne site kit says “Inserted by another plugin or theme”. Do you recommend changing to the transitional or standard mode?

    If we can determine the source of your non Site Kit placed snippet we can then work on ensuring there is only one Analytics script and property inserted into your site. If you’d like to share your Site Health information via this form I can assist and see if I spot any possible source.

    Do you recommend changing to the transitional or standard mode?

    Once we correct your Analytics duplicate scripts we can check your site for visual and functionality parity in transitional mode. If all is working as expected then standard mode ensures you only have one version of your site, which may be more ideal.

    Thread Starter tomdavis17

    (@tomdavis17)

    @jamesosborne just sent the info over to you

    Thanks for providing an update. Can you temporarily deactivate both Chaty and Squirrly SEO while I check your site once more for any Analytics tracking snippets placed, with both plugins offering Analytics features.

    Let me know once you’ve temporarily deactivated. After temporarily deactivating you can also check yourself by revisiting the Site Kit Analytics setup module.

    Thread Starter tomdavis17

    (@tomdavis17)

    @jamesosborne have just deactivated them, thanks james

    Great, I’ve just checked your site now and I can not see any Analytics snippet – meaning you have that snippet mentioned during Site Kit setup placed via one of those plugins. I also no longer see the duplicate Analytics script added to your AMP site. Can you re-enable the Squirrly SEO now and I’ll check with just that plugin active?

    Thread Starter tomdavis17

    (@tomdavis17)

    @jamesosborne Thanks, just activated again

    Thanks for sharing, I’ve checked and I can once again see the duplicate amp-analytics header script placed, many thanks for confirming. If you’re looking to use a different Analytics snippet that will be recognized during Site Kit setup you should be able to change the Analytics snippet within Squirrly SEO to a property which you have access to (from the Google account which you’ve used to setup Site Kit).

    In the meantime I’ll check the Squirrly SEO plugin from my side.

    Thread Starter tomdavis17

    (@tomdavis17)

    @jamesosborne the analytics codes are the same in Site Kit, Squirrly SEO and AMP. So what do I need to change? Sorry I’m new to all this haha

    If you’re looking to maintain no warnings for the duplicate Analytics scripts you’ll need to display the Squirrly SEO Analytics feature for the moment (while I also check from my side). Note this is a warning you received in Search Console, as opposed to an AMP validation error. This warning doesn’t result in your AMP site not being served from search.

    Secondly if you’re looking to continue using Site Kit for your site this plugin can insert your amp-analytics snippet on your site, whatever mode of the AMP plugin you’re using. You’ll need to remove any existing snippet on your site before setting up Site Kit.

    I’ll let you know here once I test Squirrly SEO.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘An AMP component ‘script’ tag is present more than once in the document.’ is closed to new replies.