Skip to content

Instantly share code, notes, and snippets.

@vaishalighuman
Created May 1, 2023 11:53
Show Gist options
  • Save vaishalighuman/432af006487a2b52c32fbca02d8585b0 to your computer and use it in GitHub Desktop.
Save vaishalighuman/432af006487a2b52c32fbca02d8585b0 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(300x250) in <body> tag
<div id="ub_direct_300x250" style="text-align: center; margin: 20px;">
<amp-ad width="300" height="250" type="doubleclick" data-slot="/21956238066/chitrajyothy_300x250" ></amp-ad>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment