Skip to content

Instantly share code, notes, and snippets.

@vaishalighuman
Last active July 20, 2023 12:13
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/d15d4ee90a98e6471f1ddee0de08d62d to your computer and use it in GitHub Desktop.
Save vaishalighuman/d15d4ee90a98e6471f1ddee0de08d62d 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 script tag in the <head> to include amp-sticky-ad and amp-fx-flying-carpet component.
<script async custom-element="amp-sticky-ad" src="https://cdn.ampproject.org/v0/amp-sticky-ad-1.0.js"></script>
<script async custom-element="amp-fx-flying-carpet" src="https://cdn.ampproject.org/v0/amp-fx-flying-carpet-0.1.js"></script>
STEP 3:
Add the following div element, where you want to show the ad in <body> tag
<div class="amp-flying-carpet-text-border">Advertising</div>
<amp-fx-flying-carpet height="300px">
<amp-ad width="300" height="600" data-multi-size="300x480" layout="fixed" type="doubleclick" data-slot="/21928950349,22814569437/t2blive_com_amp_parallax_300x600" data-enable-refresh="30">
</amp-ad>
</amp-fx-flying-carpet>
<div class="amp-flying-carpet-text-border">Advertising</div>
STEP 4:
Add the following div just before closing <body> tag
<amp-sticky-ad layout="nodisplay">
<amp-ad width="320" height="50" type="doubleclick" data-multi-size="300x50" data-slot="/21928950349,22814569437/t2blive_ampsticky_320x50" data-enable-refresh="30"></amp-ad>
</amp-sticky-ad>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment