Skip to content

Instantly share code, notes, and snippets.

@vaishalighuman
Last active June 9, 2022 09:03
Show Gist options
  • Save vaishalighuman/40c49f6b13b9c21e00d9c2a2b3141fd7 to your computer and use it in GitHub Desktop.
Save vaishalighuman/40c49f6b13b9c21e00d9c2a2b3141fd7 to your computer and use it in GitHub Desktop.
STEP 1:
Add the following script tag in the <head> to include amp-iframe component.
If already present, ignore this step.
<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
STEP 2:
Add the following div just after <figure class="amp-wp-article-featured-image"></figure> element in <body> tag
<div style="margin-top: -56px; height: 53px;text-align: center;" id="mybotUnibots">
<amp-ad width="320" height="50" type="doubleclick" data-slot="/21928950349,22758220965/topkhabre_inimage_320x50_amp" data-enable-refresh="30"></amp-ad>
</div>
STEP 3:
Add the following div element, where you want to show the ad in <body> tag
<div id="ub_300x250">
<amp-ad width=300 height=250 type="doubleclick" data-slot="/21928950349,22758220965/topkhabre_display_300x250_amp" data-enable-refresh="30"></amp-ad>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment