{"id":17668,"date":"2021-03-09T09:25:09","date_gmt":"2021-03-09T09:25:09","guid":{"rendered":"http:\/\/wiki2.plumserver.com\/?post_type=ht_kb&#038;p=17668"},"modified":"2021-09-21T08:53:27","modified_gmt":"2021-09-21T12:53:27","slug":"incorrect-script-tags-placement","status":"publish","type":"post","link":"https:\/\/plumrocket.com\/docs\/magento-amp\/v2\/troubleshooting\/script-tag-location","title":{"rendered":"Incorrect &#8220;script&#8221; tags placement"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In some cases, AMP is not valid because the script tags are in the &#8220;body&#8221; part of the HTML page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This can be caused by the third-party extension that moves &#8220;script&#8221; tags from &#8220;head&#8221; to the end of &#8220;body&#8221; part of the HTML page.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You need to set the third-party extension in a specific way, so it will not be running on <a href=\"\/magento-amp\">Magento 2 AMP pages<\/a>. These configurations can be performed in the extension&#8217;s settings or you can make minor code modifications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For this purpose contact your third-party extension developers or our\u00a0<a href=\"\/contacts\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">support service<\/a>.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In some cases, AMP is not valid because the script tags are in the &#8220;body&#8221; part of the HTML page. This can be caused by the third-party extension that moves &#8220;script&#8221; tags from &#8220;head&#8221; to the end of &#8220;body&#8221; part of the HTML page. Solution You need to set the third-party extension in a specific &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/plumrocket.com\/docs\/magento-amp\/v2\/troubleshooting\/script-tag-location\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Incorrect &#8220;script&#8221; tags placement&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[105],"tags":[],"class_list":["post-17668","post","type-post","status-publish","format-standard","hentry","category-troubleshooting","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Incorrect &quot;script&quot; tags placement - Plumrocket Documentation<\/title>\n<meta name=\"description\" content=\"In some cases, AMP is not valid because the script tags are in the &quot;body&quot; part of the HTML page. This can be caused by the third-party extension that\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/script-tag-location\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Incorrect &quot;script&quot; tags placement - Plumrocket Documentation\" \/>\n<meta property=\"og:description\" content=\"In some cases, AMP is not valid because the script tags are in the &quot;body&quot; part of the HTML page. This can be caused by the third-party extension that\" \/>\n<meta property=\"og:url\" content=\"\/docs\/magento-amp\/v3\/troubleshooting\/script-tag-location\" \/>\n<meta property=\"og:site_name\" content=\"Plumrocket Documentation\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-09T09:25:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-21T12:53:27+00:00\" \/>\n<meta name=\"author\" content=\"Plumrocket\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Plumrocket\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Incorrect \"script\" tags placement - Plumrocket Documentation","description":"In some cases, AMP is not valid because the script tags are in the \"body\" part of the HTML page. This can be caused by the third-party extension that","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/script-tag-location","og_locale":"en_US","og_type":"article","og_title":"Incorrect \"script\" tags placement - Plumrocket Documentation","og_description":"In some cases, AMP is not valid because the script tags are in the \"body\" part of the HTML page. This can be caused by the third-party extension that","og_url":"\/docs\/magento-amp\/v3\/troubleshooting\/script-tag-location","og_site_name":"Plumrocket Documentation","article_published_time":"2021-03-09T09:25:09+00:00","article_modified_time":"2021-09-21T12:53:27+00:00","author":"Plumrocket","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Plumrocket","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"\/docs\/magento-amp\/v3\/troubleshooting\/script-tag-location#article","isPartOf":{"@id":"https:\/\/plumrocket.com\/docs\/magento-amp\/v2\/troubleshooting\/script-tag-location"},"author":{"name":"Plumrocket","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8"},"headline":"Incorrect &#8220;script&#8221; tags placement","datePublished":"2021-03-09T09:25:09+00:00","dateModified":"2021-09-21T12:53:27+00:00","mainEntityOfPage":{"@id":"https:\/\/plumrocket.com\/docs\/magento-amp\/v2\/troubleshooting\/script-tag-location"},"wordCount":99,"articleSection":["Troubleshooting"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/plumrocket.com\/docs\/magento-amp\/v2\/troubleshooting\/script-tag-location","url":"\/docs\/magento-amp\/v3\/troubleshooting\/script-tag-location","name":"Incorrect \"script\" tags placement - Plumrocket Documentation","isPartOf":{"@id":"https:\/\/plumrocket.com\/docs\/#website"},"datePublished":"2021-03-09T09:25:09+00:00","dateModified":"2021-09-21T12:53:27+00:00","author":{"@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8"},"description":"In some cases, AMP is not valid because the script tags are in the \"body\" part of the HTML page. This can be caused by the third-party extension that","breadcrumb":{"@id":"\/docs\/magento-amp\/v3\/troubleshooting\/script-tag-location#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["\/docs\/magento-amp\/v3\/troubleshooting\/script-tag-location"]}]},{"@type":"BreadcrumbList","@id":"\/docs\/magento-amp\/v3\/troubleshooting\/script-tag-location#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Magento 2 Extensions","item":"https:\/\/plumrocket.com\/magento-extensions"},{"@type":"ListItem","position":2,"name":"Magento 2 AMP","item":"https:\/\/plumrocket.com\/magento-amp"},{"@type":"ListItem","position":3,"name":"Documentation","item":"https:\/\/plumrocket.com\/docs\/magento-amp"},{"@type":"ListItem","position":4,"name":"v2","item":"https:\/\/plumrocket.com\/docs\/magento-amp\/v2"},{"@type":"ListItem","position":5,"name":"Troubleshooting","item":"https:\/\/plumrocket.com\/docs\/magento-amp\/v2\/troubleshooting"},{"@type":"ListItem","position":6,"name":"Incorrect &#8220;script&#8221; tags placement"}]},{"@type":"WebSite","@id":"https:\/\/plumrocket.com\/docs\/#website","url":"https:\/\/plumrocket.com\/docs\/","name":"Plumrocket Documentation","description":"Extensions docs, troubleshootings etc.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/plumrocket.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8","name":"Plumrocket","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/30d7e8cb4567485b56880a1658849a1252ac12806e8f95b3be71e986bf5eabee?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/30d7e8cb4567485b56880a1658849a1252ac12806e8f95b3be71e986bf5eabee?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/30d7e8cb4567485b56880a1658849a1252ac12806e8f95b3be71e986bf5eabee?s=96&d=mm&r=g","caption":"Plumrocket"}}]}},"_links":{"self":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/17668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/comments?post=17668"}],"version-history":[{"count":2,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/17668\/revisions"}],"predecessor-version":[{"id":24187,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/17668\/revisions\/24187"}],"wp:attachment":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/media?parent=17668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/categories?post=17668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/tags?post=17668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}