Overview
Freestar's AMP integration requires an IAB-compliant CMP for ads to render in GDPR regions. Publishers can supply their own CMP or use Freestar's CMP solution through Sourcepoint. When Sourcepoint is enabled, you will see domain-specific tags in your dashboard. Follow the steps below to integrate Sourcepoint with your AMP site.
Prerequisite
The below code snippets are examples. If you haven't retrieved your domain-specific AMP code, please do that first. Instructions here.
CMP & Geo Override
Place your domain-specific tags at the top of your AMP pages <body>.
HTML
<body>
<amp-geo layout="nodisplay">
<script type="application/json">
{
"ISOCountryGroups": {
"eea": ["preset-eea", "unknown"],
"ccpa": ["preset-us-ca", "us-va", "us-co", "us-ct"]
}
}
</script>
</amp-geo>
<amp-consent id="consent" layout="nodisplay">
<script type="application/json">
{
"consentRequired": false,
"checkConsentHref": false,
"consentInstanceId": "sourcepoint",
"promptUISrc": "https://cdn.privacy-mgmt.com/amp/unified/index.html?authId=CLIENT_ID&source_url=SOURCE_URL",
"clientConfig": {
"accountId": 1234,
"propertyHref": "https://amp.mydomain.com",
"stageCampaign": false
},
"geoOverride": {
"eea": {
"consentRequired": "remote",
"checkConsentHref": "https://cdn.privacy-mgmt.com/wrapper/tcfv2/v1/amp-v2?authId=CLIENT_ID",
"postPromptUI": "eea-consent-ui",
"clientConfig": {
"privacyManagerId": 1234,
"pmTab": "purposes"
}
},
"ccpa": {
"consentRequired": "remote",
"checkConsentHref": "https://cdn.privacy-mgmt.com/wrapper/ccpa/amp-v2?authId=CLIENT_ID",
"postPromptUI": "ccpa-consent-ui",
"clientConfig": {
"isCCPA": true,
"privacyManagerId": "1234b56a7891e234cb56789d0"
}
}
}
}
</script>
</amp-consent>
<!--The rest of your content-->
</body>
Resurfacing Links
A "resurfacing" link must be placed on your AMP pages to allow users to change their consent choices anytime. Insert these links into your <footer>.
The following code will display a link; consent choices will be re-prompted once clicked, allowing users to change their settings.
HTML
<div id="ccpa-consent-ui" class="consent-ccpa">
<a on="tap:consent.prompt(consent=SourcePoint)">Do not sell or share my personal information</a>
</div>
<div id="eea-consent-ui" class="consent-eea">
<a on="tap:consent.prompt(consent=SourcePoint)">Privacy Settings</a>
</div>
The following CSS determines which re-prompt links should be shown based on the user's location.
These css rules must be inserted into your existing
<style amp-custom>stylesheet.
CSS
.consent-eea {
display:none;
}
.consent-ccpa{
display:none;
}
.amp-geo-group-eea .consent-eea {
display:block;
}
.amp-geo-group-ccpa .consent-ccpa {
display:block;
}
Below is an example of what this may look like