The ping
command will return the GPP pingReturn
object that you can use to determine the state of the CMP.
By default, Sourcepoint will set the respective U.S. State privacy section for each of the following U.S. states that are added to the framework territories of a property's vendor list: California, Colorado, Connecticut, Utah, and Virginia. The U.S. National Privacy section will be set for all other U.S. states added to the framework territories of a property's vendor list.
Command
//call the __gpp() function from the browser console with the ping command
__gpp('ping', (pingReturn, success) => {console.log('Ping request was successful: ' + success, pingReturn);});
...
function ping() {
console.log("ping command called");
__gpp("ping", (pingReturn, success) => {
if (success) {
// do something with GPPData
console.log(pingReturn);
console.log("ping request was successful: " + success);
} else {
// do something else
console.log("gpp call was not successful!");
}
});
}
...
Response
Historically, organizations who have used U.S. Privacy (Legacy) campaigns have looked at the
uspString
(e.g.1YNN
) to determine the applicability of the framework to an end-user. When using U.S. Multi-State Privacy campaigns, the applicability of sections to an end-user within the Global Privacy Platform MSPS framework is determined by looking at theapplicableSections
response in theping
command.
{
"applicableSections": [
7
],
"cmpDisplayStatus": "hidden",
"cmpId": 6,
"cmpStatus": "loaded",
"gppString": "ABCBLA~BVQqAAAAAgA.QA",
"gppVersion": "1.1",
"parsedSections": {
"usnatv1": {
"Gpc": false,
"GpcSegmentType": 1,
"KnownChildSensitiveDataConsents": [
0,
0
],
"MspaCoveredTransactions": 2,
"MspaOptOutOptionMode": 0,
"MspaServiceProviderMode": 0,
"PersonalDataConsents": 0,
"SaleOptOut": 2,
"SaleOptOutNotice": 1,
"SensitiveDataLimitUseNotice": 0,
"SensitiveDataProcessing": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"SensitiveDataProcessingOptOutNotice": 0,
"SharingNotice": 1,
"SharingOptOut": 2,
"SharingOptOutNotice": 1,
"TargetedAdvertisingOptOut": 2,
"TargetedAdvertisingOptOutNotice": 1,
"Version": 1
}
},
"sectionList": [
7
],
"signalStatus": "ready",
"supportedAPIs": []
}
schema:
description: pingReturn object
type: object
properties:
applicableSections:
type: array
description: "Section ID considered to be enforced for this transaction. In most cases, this field should have a single section ID. In rare occasions where such a single section ID can not be determined, the field may contain up to 2 values. [Click here](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/Section%20Information.md#section-ids) for more information on section ID values."
items:
type: number
description: "Section ID"
example: 7
cmpDisplayStatus:
type: string
description: "Possible values: hidden | visible | disabled."
example: hidden
cmpId:
type: number
description: "IAB assigned CMP ID"
example: 6
cmpStatus:
type: string
description: "Possible values: stub | loading | loaded | error."
example: loaded
gppString:
type: string
description: "Complete encoded GPP string. May be empty during CMP load"
example: ABCBLA~BVQqAAAAAgA.QA
gppVersion:
type: string
description: "Gpp version.sub-version"
example: "1.1"
parsedSections:
type: object
description: "Represents an object of all parsed sections of the gppString property that are supported by the API on this page. The object contains one property for each supported API with the name of the API as the property name and the value as a parsed representation of this section (similar to getSection command). If a section is supported but not represented in the gppString, it is omitted in the parsedSections object."
properties:
usnatv1:
type: object
description: "Section fields of the U.S. National privacy section"
properties:
Gpc:
type: integer
description: "Was Global Privacy Control enabled for the vendor list and detected on the end-user's browser?"
example: false
GpcSegmentType:
type: integer
description: "Possible values: 0 = Core | 1 = GPC"
example: 1
KnownChildSensitiveDataConsents:
type: array
description: "Consents for each data activity (2) in the processing of personal or sensitive data of consumer who is a known child category. Possible values: 0 = Not applicable | 1 = No consent | 2 = Consent"
items:
type: integer
example: [0, 0]
MspaCoveredTransactions:
type: integer
description: "Publisher or Advertiser, as applicable, is a signatory to the IAB Multi-state Service Provider Agreement (MSPA), as may be amended from time to time, and declares that the transaction is a “Covered Transaction” as defined in the MSPA. Possible values: 1 = Yes | 2 = No"
example: 2
MspaOptOutOptionMode:
type: integer
description: "Publisher or Advertiser, as applicable, has enabled “Opt-Out Option Mode” for the “Covered Transaction,” as such terms are defined in the MSPA. Possible values: 0 = Not applicable | 1 = Yes | 2 = No"
example: 0
MspaServiceProviderMode:
type: integer
description: "Publisher or Advertiser, as applicable, has enabled “Service Provider Mode” for the “Covered Transaction,” as such terms are defined in the MSPA. Possible values: 0 = Not applicable | 1 = Yes | 2 = No"
example: 0
PersonalDataConsents:
type: integer
description: "Consent to Collection, Use, Retention, Sale, and/or Sharing of the Consumer’s Personal Data that Is Unrelated to or Incompatible with the Purpose(s) for which the Consumer’s Personal Data Was Collected or Processed. Possible values: 0 = Not applicable | 1 = No consent | 2 = Consent"
example: 0
SaleOptOut:
type: integer
description: "Opt-Out of the Sale of the Consumer’s Personal Data. Possible values: 0 = Not applicable | 1 = Opted out | 2 = Did not opt out"
example: 2
SaleOptOutNotice:
type: integer
description: "Notice of the Opportunity to Opt Our of the Sales of the Consumer's Personal Data. Possible values: 0 = Not applicable | 1 = Yes, notice provided | 2 = No, notice not provided"
example: 1
SensitiveDataLimitUseNotice:
type: integer
description: "Notice of the Opportunity to Limit Use or Disclosure of the Consumer’s Sensitive Data. Possible values: 0 = Not applicable | 1 = Yes, notice provided | 2 = No, notice not provided"
example: 0
SensitiveDataProcessing:
type: array
description: "Consents for each data activity (12) in the sensitive data category. Possible values: 0 = Not applicable | 1 = No consent | 2 = Consent"
items:
type: integer
example: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
SensitiveDataProcessingOptOutNotice:
type: integer
description: "Notice of the Opportunity to Opt Out of the Processing of the Consumer’s Sensitive Data. Possible values: 0 = Not applicable | 1 = Yes, notice provided | 2 = No, notice not provided"
example: 0
SharingNotice:
type: integer
description: "Notice of the Sharing of the Consumer's Personal Data with Third Parties. Possible values: 0 = Not applicable | 1 = Yes, notice provided | 2 = No, notice not provided"
example: 1
SharingOptOut:
type: integer
description: "Opt-Out of the Sharing of the Consumer’s Personal Data. Possible values: 0 = Not applicable | 1 = Opted out | 2 = Did not opt out"
example: 2
SharingOptOutNotice:
type: integer
description: "Notice of the Opportunity to Opt Out of the Sharing of the Consumer's Personal Data. Possible values: 0 = Not applicable | 1 = Yes, notice provided | 2 = No, notice not provided"
example: 1
TargetedAdvertisingOptOut:
type: integer
description: "Opt-Out of Processing the Consumer’s Personal Data for Targeted Advertising. Possible values: 0 = Not applicable | 1 = Opted out | 2 = Did not opt out"
example: 2
TargetedAdvertisingOptOutNotice:
type: integer
description: "Notice of the Opportunity to Opt Out of Processing of the Consumer’s Personal Data for Targeted Advertising. Possible values: 0 = Not applicable | 1 = Yes, notice provided | 2 = No, notice not provided"
example: 1
Version:
type: integer
description: "The version of the U.S. National Privacy Section used to encode the string."
example: 1
sectionList:
type: array
description: "Sections contained within the encoded GPP string as parsed from the header."
example: [7]
signalStatus:
type: string
description: "Possible values: ready | not ready. Used to let callers know if the CMP is ready to respond to with the corresponding GPP string and applicable section IDs."
example: ready
supportedAPIs:
type: array
description: "List of supported APIs (section ids and prefix strings), e.g. used while loading."
example: []
Click here for more information about the
ping
command,ping status codes
, and thepingReturn
object.