AMP Implementation for CCPA


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

The process for setting 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.

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 and

‌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 CCPA

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, propertyId 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.

<amp-consent id='consent' layout='nodisplay'>
<script type="application/json">
"consentRequired": "remote",
"consentInstanceId": "sourcepoint",
"checkConsentHref": "",
"promptUISrc": "",
"postPromptUI": "consent-ui",
"uiConfig": {"overlay":true},
"clientConfig": {
"accountId": 1319,
"propertyHref": "",
"isCCPA": true,
"stageCampaign": false,
"privacyManagerId": "5ea9bc1433cc622fca6fb662",
"getDnsMsgMms": true,
"alwaysDisplayDns": false,
"showNoticeUntilAction": true
<div id="consent-ui">
<button on="tap:consent.prompt(consent=SourcePoint)">Privacy Settings</button>

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

  • consentRequired - This tells the AMP consent component to use code from a remote source. This should always be set to "remote".

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

  • checkConsentHref - This is the 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}/ccpa/consent/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.

In order to save preferences for users arriving on your AMP property via Google search results, please include


appended to the promptUISrc configuration URL

  • 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.

  • 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 "".

  • isCCPA - This should always be set to true and pull in the CCPA library for AMP.

  • stageCampaign - In production environments this should be set to true. It can be used to test alternate campaigns without affecting production campaigns.

  • 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).

  • getDnsMsgMms - Should be set to true if you want to display a notice to a user.

  • alwaysDisplayDns - This should be set to false.

  • showNoticeUntilAction - If this parameter is not there or set to false, it will only show the message once. If the user does not take an action it opts the user in. If you set this parameter to true, it will continue showing the message until they make an explicit consent decision.