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
The cookie sync tag loads a small piece of AMP-compatible JavaScript, allowing SSPs to set user-syncing cookies for targeted advertising. Place this tag immediately after your </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>
Â
RTC Config
Your RTC config IDs can be found in your dashboard; they will look like the following:
{
"vendors": {
"t13": {
"TAG_ID": "1234-5678-9123-1234-123456789",
"ACCOUNT_ID": "1234-5678-9123-1234-123456789"
}
}
}
If you are not currently using an RTC provider, you must specify the rtc-config attribute on each amp-ad Freestar will monetize, placing the "vendors" object from your dashboard within it.
Pay close attention to syntax here,Â
rtc-config is a JSON object and we need to use a combination ofÂ' andÂ" for the payload to parse correctly.
Example
<amp-ad
width="336"
height="280"
layout="fixed"
type="doubleclick"
data-slot="/1234/myAdUnit"
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"
}
}
}'
>
</amp-ad>
Already using another RTC provider?
"t13" object in your existing vendors object.
Real-Time-Config only allows up to five callouts for each individual ad slot, this includes bothÂ
"vendors"Â andÂ"urls"
Example
<amp-ad
width="336"
height="280"
layout="fixed"
type="doubleclick"
data-slot="/1234/myAdUnit"
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"
},
"someVendor": {
"ID": "1234-5678-9123-1234-123456789"
},
"someOtherVendor": {
"ID": "1234-5678-9123-1234-123456789"
}
}
}'
>
</amp-ad>
Ad Unit Options
Freestar recommends the following optional, ad unit type-specific parameters to use within your <amp-ad>.
Standard Ad Unit
data-enable-refresh="30"
data-lazy-fetch="true"
data-loading-strategy="1.25"
Sticky Footer
data-enable-refresh="30"
Flying Carpet
data-lazy-fetch="true"
data-loading-strategy="1.25"
Grant Google Ad Manager API Access
Freestar requires full administrative access to automate order and line item creation. Instructions here.
What do we build?
To alleviate any concerns you may have surrounding what is generated within your GAM network, below is an outline of each object created when generating our AMP orders.
- 1 Advertiser
- 2 Orders
- 900 Line Items - 450 per order
- 1 Key with 900 pre-defined Values
- 10 Creatives
Â
Please submit a request here if you have any questions about GAM setup.