AMP Embed Component Not Loading on AMP Pages
-
Hello Team,
We are using the official AMP Plugin (Version 2.5.5) on our WordPress website.
We are trying to implement an AMP widget provided by a third-party ad network (MGID) using the following code:
1. Paste the loader code into the webpage <HEAD>
<script src=”https://jsc.mgid.com/site/1100255.js” async></script>2. Paste the “In Article widget” container code to the webpage <BODY> At the middle of the article ( For AMP)
<amp-embed width=”600″ height=”600″ layout=”responsive” type=”mgid” data-website=”1100255″ data-widget=”2038570″ data-block-on-consent=”_till_responded”></amp-embed>
We have verified the following:
- The AMP page validates successfully.
- The widget markup is present in the final page source.
- The widget placement is rendering correctly on the page.
- Custom changes made in amp-single.php are reflected in the final source.
- The AMP page source contains the amp-embed markup with the correct widget and website IDs.
However, we have noticed that the AMP component script does not appear in the final rendered AMP source, even after adding it to the AMP template.
As a result:
- No content is rendered inside the amp-embed tag.
- No network requests are made to the ad provider.
- The widget remains empty on AMP pages.
Could you please advise:
- Whether amp-embed is supported in AMP Plugin v2.5.5 (Reader Mode)?
- Whether additional registration is required for custom amp-embed components?
- Whether the AMP plugin strips or sanitizes amp-embed components by default?
- What is the recommended approach for implementing third-party AMP widgets such as MGID?
Any guidance would be greatly appreciated.
Thank you.
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.