AMP Implementation for TCF v2 Using AMP-GEO


This document provides guidance on how to integrate the Sourcepoint CMP (Consent Management Platform) with your AMP (Accelerated Mobile Pages) inventory for the IAB's Transparency and Consent Framework version 2.0. To perform this integration you should have some level of technical knowledge and access to update the AMP website code.

The process for setting up messages, scenarios, partitions and campaigns is the same as the process for setting up any consent messaging campaign. However, the process for setting up the properties, vendor lists and privacy manager may differ.

This document also provides information on using the <amp-geo> component to ensure that consent is only required for regions where GDPR applies

Setting Up An AMP Property

‌The process for setting up an AMP property is generally the same as the process for setting up a property for any other messaging campaign. It is recommended that you set up an alternate property to deliver messages on AMP pages. This will allow you to set up separate vendor lists for AMP pages. Examples of an AMP property name for the site would be or

‌For more information on how to create a new property, please visit the Creating Properties article.

Setting Up A Message

Messages for AMP are created using the Sourcepoint's new Message Builder 2 product. For more information on creating a message using Message Builder 2, please visit the "How to Create a Message Version" in version 2 of the messaging section.

The steps for setting up a partition and campaign are nearly the same as the steps for creating partitions and campaigns for any messaging campaign. Please see the sections listed below for more information.

Setting Up A Scenario

Setting up a scenario for AMP is a little different than other consent campaigns. This difference is because the AMP component will determine on its own whether consent has been previous given by the user. The scenario within a consent campaign for AMP, therefore, should not include a consent gate.

Please be aware that Consent Gate scenario steps should not be used for AMP implementations.

You can learn more about setting up a scenario by reading the How to Create A Scenario article.

Setting Up A Partition and Campaign

The steps for setting up a partition and campaign are nearly the same as the steps for creating partitions and campaigns as for other messaging campaigns. Please see the sections listed below for more information.

Setting Up Vendor Lists And Privacy Managers

There is one minor difference in setting up a vendor list for AMP pages. For AMP pages, you should not create any consent or reject actions in vendor lists. AMP does not allow Javascript to be run in the AMP context, so consent and reject actions will not work.

Setting up the CNAME DNS Record

‌In order for the AMP consent to be persistently recorded for people using Safari, we need to set the consent preferences in the first-party space. To accomplish this, you need to set up a CNAME DNS record to include in the configuration.

Please read the Setting Up the CNAME DNS Record for Single CNAME article on setting up a CNAME record for this solution.

Integrating Sourcepoint CMP Code Into Your AMP Website for TCF Version 2.0

After you have created a property in the Sourcepoint user interface, you can integrate the Sourcepoint CMP into your AMP website by using the amp-consent component, and inserting the proper attributes in the amp-consent component tags.

‌The example code below is for an example campaign running in the Sourcepoint account. It uses a CNAME record of with the respective accountId, siteName, siteId and privacyManagerId values for that account. If you swap your subdomain for the values related to your account you will be able to display messages. You MUST use your own CNAME record in order for the solution to work properly.

The code also uses the <amp-geo> component and the preset-eea group to define the region where we want to require consent. The part of the code that lies within the geoOverride parameter will only be executed if the <amp-consent> component detects that the user is in the EEA. This means that for regions outside the EEA consent will not be required for any component that has the data-block-on-consent attribute.

<amp-geo layout="nodisplay">
<script type="application/json">
"AmpBind": true,
"ISOCountryGroups": {
"eea": [ "preset-eea", "unknown" ]
<amp-consent id='consent' layout='nodisplay' >
<script type="application/json">
"consentInstanceId": "SourcePoint",
"consentRequired": false,
"geoOverride": {
"eea": {
"consentRequired": "remote",
"checkConsentHref": "",
"promptUISrc": "",
"postPromptUI": "consent-ui",
"uiConfig": {"overlay":true},
"clientConfig": {
"accountId": 222,
"mmsDomain": "",
"propertyHref": "",
"propertyId": 1234,
"privacyManagerId": 987654,
"isTCFV2": true,
"pmTab": "purposes",
"stageCampaign": false,
"targetingParams": {
"color": "red"

AMP GEO Component

If you wish to use the AMP Geo component you will need to add the following to the header of your page:

<script async custom-element="amp-geo" src=""></script>

As noted in the scenario section, if you are using this component, do not add geo targeting to you campaign's scenarios

Below are the definitions for the parameters you need to deliver a TCF v2 AMP solution.

  • consentRequired - This tells the AMP consent component whether consent is required for components using the data-block-on-consent attribute. The possible values are:

    • false - consent is not required.

    • true - consent is required.

    • remote - consent is required and uses the third-party consent library listed in the consentInstanceId parameter.

  • consentInstanceId - This tells the AMP consent component to use the Sourcepoint code. This should always be set to "sourcepoint".

  • checkConsentHref - This URL that will check the user's consent. The path for this URL will leverage the CNAME record from the "Setting up the CNAME DNS Records" section of the document. The format of the URL path is https://{CNAME SUBDOMAIN}/wrapper/tcfv2/v1/amp where {CNAME SUBDOMAIN} would be replaced by the CNAME subdomain record created.

  • promptUISrc - This is the URL that will return the post prompt user interface where user's can change their consent. The path should always be set to "https://{CNAME SUBDOMAIN}/amp/index.html" where {CNAME SUBDOMAIN} would be replaced by the CNAME subdomain record previously created.

  • postPromptUI - This is the page element that should be displayed to users to provide them with the ability to change their consent after they initially consent.

  • uiConfig - An optional parameter that adds a light black overlay to the site behind the message experience. Can be used to deter end-user scrolling without engaging with your consent experience.

  • accountId - This corresponds with your Sourcepoint account ID.

  • mmsDomain - This is the domain that will communicate with the Sourcepoint messaging service. The format for the path of this parameter is https://{CNAME SUBDOMAIN} where {CNAME SUBDOMAIN} would be replaced by the CNAME subdomain record previously created.

  • propertyHref - This is the property created in the Sourcepoint UI that contains the message, scenario, partition and campaign. The property name should be preceded by the "https://" protocol. For example, a property defined as "" in the UI should have a propertyHref parameter of "".

  • propertyId - The ID of the property on which the message is supposed to be served. You can get the property from the address bar at the end of the URL.

Please include the ?authId=CLIENT_ID url parameter in the promptUISrc entry. This will allow consent preferences to be saved when your users arrive from a search.

  • privacyManagerId - The ID of the privacy manager to be associated with the postPromptUI element. The ID of the privacy manager can be obtained from the Privacy Manager create window (see screenshot below).