CCPA AMP Implementation

In this article, we will cover how to implement Sourcepoint's CCPA consent messaging solution with your AMP (Accelerated Mobile Pages) inventory.

Additional information on utilizing the <amp-geo> component to ensure that consent is only required for regions where CCPA applies can be found here.


In order to record and persist AMP consent for end-users using Safari browsers, your organization must set consent preferences in the first-party space. Click here for more information on how to set up a CNAME DNS record.


While the process to set up an AMP property is the same as any other web property (i.e. Sourcepoint currently does not have an AMP property type), it is strongly encouraged that your organization set up alternate properties to deliver messages on AMP pages.

Sourcepoint recommends this set up so that your organization can create separate vendor lists for your AMP pages. Examples of an AMP property name for the site would be


The following restrictions should be adhered to with your CCPA AMP implementation:

  • Be aware that AMP does not allow Javascript to be run in the AMP context. This restriction means that your organization cannot create any consent or reject action in a vendor list.

Click here for more information on AMP guidelines.

CCPA AMP implementation overview

The CCPA AMP implementation is comprised of three distinct parts:

CCPA AMP headers

Please add the following two scripts into your header:

//required to sync auth_id with publishers domain and domain
<script async custom-element="amp-analytics" src=""></script>
//required for the amp-consent component
<script async custom-element="amp-consent" src=""></script>

<amp-analytics> component

Please include the following component in your implementation as is without any modification.

<script type=application/json>
"linkers":{"authId":{"ids":{"_a":"CLIENT_ID(AMP-CONSENT)"},"enabled":true,"proxyOnly":false}},"cookies":{"enabled":true,"authId":{"value":"LINKER_PARAM(authId, _a)"}}

The amp-consent component is where you will include the specific account and property details for your organization.

<amp-consent id='consent' layout='nodisplay'>
<script type="application/json">
"consentRequired": "remote",
"consentInstanceId": "sourcepoint",
"checkConsentHref": "https://CNAME_SUBDOMAIN/ccpa/consent/amp",
"promptUISrc": "https://CNAME_SUBDOMAIN/amp/index.html?authId=CLIENT_ID",
"postPromptUI": "consent-ui",
"uiConfig": {"overlay":true},
"cookies": {
"enabled": true,
"value": "LINKER_PARAM(authId, _a)"
"clientConfig": {
"accountId": 1319,
"propertyHref": "",
"isCCPA": true,
"stageCampaign": false,
"privacyManagerId": "5ea9bc1433cc622fca6fb662",
"getDnsMsgMms": true,
"alwaysDisplayDns": false,
"showNoticeUntilAction": true

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




Parameter tells the <amp-consent> component to use code from a remote source. This parameter should always be set toremote.


Parameter tells the <amp-consent> component to use Sourcepoint code. This parameter should always be set tosourcepoint.


URL that will check the user's consent.

The format of the URL path is https://{CNAME SUBDOMAIN}/ccpa/consent/amp where {CNAME SUBDOMAIN} is the CNAME subdomain record previously created.


URL that will return the post prompt user interface where users can change their consent.

The path should always be set to https://{CNAME SUBDOMAIN}/amp/index.html where {CNAME SUBDOMAIN} is the CNAME subdomain record previously created.

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


The page element that should be displayed to end-users to provide them with the ability to change their consent after they initially consent.


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.


Required to store and persist consent across pages. This object should always be defined exactly as in the example:

"cookies": {

"enabled": true,


"value": "LINKER_PARAM(authId, _a)"




The accountId value associates the property with your organization's Sourcepoint account. Your organization's accountId can be retrieved by contacting your Sourcepoint Account Manager or via the My Account page in your Sourcepoint account.


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. Example: a property defined as in your Dashboard should have a propertyHref parameter of


Maps the message to a specific property (website, app, OTT) as set up in the Sourcepoint account dashboard.


Parameter tells the <amp-consent> component to pull in the CCPA library for AMP. The value for this parameter should always be set to true.


A parameter that accepts a boolean value. When set to true, the implementation will display a CCPA messaging campaign configured for the stage environment.


The ID of the privacy manager to be associated with the postPromptUI element.


If the value of this parameter is set to true, you want to display a message to the user.


The value for this parameter should always be set to false.


If this parameter is omitted or set to false, your implementation will only show your message once. If the user does not take an action it will opt the end-user in. If you set this parameter to true, the implementation will continue showing the message until the end-user make an explicit consent decision.


Targeting params allow a developer to set arbitrary key/value pairs. These key/value pairs are sent to Sourcepoint servers where they can be used to take a decision within the scenario builder.

targetingParams: {

key1: valueA, key2: valueB }