Prerequisite
The below code snippets are examples. If you haven't retrieved your domain-specific AMP code, please do that first. Instructions are found here.
Cookie Sync
</amp-consent> closing tag.<!-- <amp-consent> tag -->
<amp-iframe
layout="fixed-height"
width="auto"
title="User Sync"
data-block-on-consent
height="1"
sandbox="allow-scripts allow-same-origin"
frameborder="0"
src="https://static.s2s.t13.io/generic/load-cookie.html?source=amp"
style="display: block; margin: 0">
<amp-img layout="fill" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" placeholder></amp-img>
</amp-iframe>
Ad Tags
| Ad Unit Type | Description |
|---|---|
| Standard | Static banners consisting of multiple sizes. Best used as an in-content ad |
| Sticky Footer | Static banner that displays and sticks ad content at the bottom of the page |
| Flying Carpet | Parallax animated ad. As a user scrolls through the content, the ad is fully revealed. |
| Video | Floating Video player served via Primis (see note below) |
Please speaks with your Freestar Point of Contact for more information on our AMP video product.
For best practices and placement, see our demo page here.
All ad units are optimized for the best possible yield and performance. Attributes should not be altered unless first discussed with your Freestar customer success team.
Standard Ad Unit
The Standard Ad Unit can be placed anywhere on your AMP page; it is best utilized within meaningful content.
Standard Ad Unit Example
<!--content-->
<amp-ad
data-block-on-consent
width="336"
height="280"
layout="fixed"
data-multi-size="300x250,250x250"
data-multi-size-validation="false"
type="doubleclick"
data-slot="/1234/FS-YourDomain-AMP/AMP-1"
data-enable-refresh="30"
data-lazy-fetch="true"
data-loading-strategy="1.25"
rtc-config='{
"vendors": {
"t13": {
"TAG_ID": "1234-5678-9123-1234-123456789",
"ACCOUNT_ID": "1234-5678-9123-1234-123456789"
},
"aps": {
"PUB_ID": "123",
"PUB_UUID": "1234-5678-9123-1234-123456789",
"PARAMS": {
"amp": "1"
}
},
"criteo": {
"NETWORK_ID": "1234",
"ZONE_ID": "1234",
"PUBLISHER_SUB_ID": "FS-YourDomain-AMP-1"
},
"medianet": {
"CID": "1234"
}
}
}'
>
</amp-ad>
<!--content-->
Sticky Footer
The Sticky Footer is a unique AMP ad unit that automatically sticks an ad to the bottom of the page.
Below is a list of AMP-defined rules to keep in mind when using the ad unit:
- There can be only one Sticky Footer in an AMP document.
- The Sticky Footer appears at the bottom of a page.
- When scrolling to the bottom of the page, the viewport is automatically padded with the additional height of the Sticky Footer, so no content is ever hidden.
- The Sticky Footer can be dismissed and removed by the close button.
- If no ad is filled, the Sticky Footer container will collapse and no longer be visible.
Sticky Footer Example
<amp-sticky-ad layout="nodisplay">
<amp-ad
data-block-on-consent
width="320"
height="50"
layout="fixed"
data-multi-size="300x50"
data-multi-size-validation="false"
type="doubleclick"
data-slot="/1234/FS-YourDomain-AMP//AMP-Sticky"
data-enable-refresh="30"
rtc-config='{
"vendors": {
"t13": {
"TAG_ID": "1234-5678-9123-1234-123456789",
"ACCOUNT_ID": "1234-5678-9123-1234-123456789"
},
"aps": {
"PUB_ID": "123",
"PUB_UUID": "1234-5678-9123-1234-123456789",
"PARAMS": {
"amp": "1"
}
},
"criteo": {
"NETWORK_ID": "1234",
"ZONE_ID": "1234",
"PUBLISHER_SUB_ID": "FS-YourDomain-AMP-Sticky"
},
"medianet": {
"CID": "1234"
}
}
}'
>
</amp-ad>
</amp-sticky-ad>
Flying Carpet
The Flying Carpet is a parallax animated ad. As a user scrolls, the Flying Carpet reveals more of its content, sliding over the ad as if peering through a window on the page.
Below is a list of AMP-defined rules to keep in mind when using the ad unit:
- The Flying Carpet should be positioned so it doesn't obscure the first viewport (outside of the top 75%).
- The Flying Carpet should be positioned so that its top can reach or be above the top of the last viewport when scrolled.
Flying Carpet Example
<amp-fx-flying-carpet height="600px">
<amp-ad
data-block-on-consent
width="300"
height="600"
layout="fixed"
type="doubleclick"
data-slot="/1234/FS-YourDomain-AMP/AMP-FlyingCarpet"
data-lazy-fetch="true"
data-loading-strategy="1"
rtc-config='{
"vendors": {
"t13": {
"TAG_ID": "1234-5678-9123-1234-123456789",
"ACCOUNT_ID": "1234-5678-9123-1234-123456789"
},
"aps": {
"PUB_ID": "123",
"PUB_UUID": "1234-5678-9123-1234-123456789",
"PARAMS": {
"amp": "1"
}
},
"criteo": {
"NETWORK_ID": "1234",
"ZONE_ID": "1234",
"PUBLISHER_SUB_ID": "FS-YourDomain-AMP-FlyingCarpet"
},
"medianet": {
"CID": "1234"
}
}
}'
>
</amp-ad>
</amp-fx-flying-carpet>
What's Next