Skip to content

Instantly share code, notes, and snippets.

@vaishalighuman
Created September 16, 2023 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vaishalighuman/ec9bfac71770efab280da40093541527 to your computer and use it in GitHub Desktop.
Save vaishalighuman/ec9bfac71770efab280da40093541527 to your computer and use it in GitHub Desktop.
STEP 1:
Add the following script tags 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 element, where you want to show the ad in <body> tag
<div id="ub_300x250" style="text-align: center; margin: 20px;">
<amp-ad width="300" height="250" type="doubleclick" data-slot="/71872138/tupaki_com_300x250_AMP_1" 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_1" style="text-align: center; margin: 20px;">
<amp-ad width="300" height="250" type="doubleclick" data-slot="/71872138/tupaki_com_300x250_AMP_2" 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