Skip to main content

Consent Data in Your Events

The SDK records consent in two places, so you can show what was collected under what permission:

  • a consent context on every event, recording the state in force when the event was collected
  • a consent change event each time the decision changes, recording what changed and why

Schema: iglu:io.surfside.consent/state/jsonschema/1-0-0

Attached to every event the SDK sends, including page views, ecommerce actions and impressions.

FieldTypeDescription
trackinggranted | deniedThe tracking decision when the event was collected
identitygranted | deniedThe identity decision when the event was collected
signaltcf | gpp | gpc | api | noneThe source responsible for the decision. none means no source expressed a preference and the default applied.
jurisdictionsstring[]The US GPP sections that apply to the shopper, for example ["usca"]. Only present when GPP reported them. At most two.
{
"schema": "iglu:io.surfside.consent/state/jsonschema/1-0-0",
"data": {
"tracking": "granted",
"identity": "denied",
"signal": "gpc"
}
}

Which source gets the credit​

When several sources reported, signal names the one that matters most:

  1. a source denying identity
  2. otherwise, a source denying tracking
  3. otherwise, the source that granted

So a shopper with GPC switched on whose CMP granted everything shows identity: "denied", signal: "gpc".

Schema: iglu:io.surfside.consent/signal/jsonschema/1-0-0

Sent to every Surfside tracker on the page when the tracking or identity decision changes.

FieldTypeDescription
sourcetcf | gpp | gpc | api | noneThe source responsible for the new decision
trackinggranted | deniedThe new tracking decision
identitygranted | deniedThe new identity decision
previousTrackinggranted | deniedThe tracking decision before the change
previousIdentitygranted | deniedThe identity decision before the change
jurisdictionsobject[]Per-section GPP detail (see below). Present only when GPP is the responsible source.
signalStringstringThe CMP's encoded TC string (TCF) or GPP string (GPP), when there is one. Up to 4,096 characters.
cmpIdnumberThe IAB CMP ID, when the CMP supplied one
gdprAppliesbooleanTCF's gdprApplies, when TCF is the responsible source
createdAtstringISO 8601 time of the change

Each GPP jurisdiction object contains:

FieldDescription
sectionThe section's API prefix, for example usca
sectionIdThe GPP section ID, for example 8
saleOptOut, sharingOptOut, targetedAdvertisingOptOutopted-out, did-not-opt-out or not-applicable, for the fields the section defines
gpcThe GPC value carried inside the section
mspaServiceProviderModeyes, no or not-applicable
mspaCoveredTransactionyes or no
{
"schema": "iglu:io.surfside.consent/signal/jsonschema/1-0-0",
"data": {
"source": "gpp",
"tracking": "granted",
"identity": "denied",
"previousTracking": "granted",
"previousIdentity": "granted",
"jurisdictions": [
{ "section": "usca", "sectionId": 8, "saleOptOut": "opted-out", "sharingOptOut": "opted-out" }
],
"signalString": "DBABBg~BUoAAABA.QA",
"cmpId": 300,
"createdAt": "2026-10-13T14:03:11.402Z"
}
}

When it is sent, and when it isn't​

SituationChange event?
A shopper accepts, rejects or changes their choiceYes
GPC is switched on, or a GPP/TCF CMP publishes a new decisionYes
setConsent changes a decisionYes
The CMP re-publishes the same decisionNo, nothing changed
A decision is restored from an earlier page viewNo. It's still enforced from the first event, but the shopper didn't decide anything on this page.
A stored decision is discarded by maxAgeDays, resetToken or enabled: falseNo

Because the event carries the raw signalString alongside the SDK's reading of it, consent decisions can be re-checked later against the original CMP output.

Identity contexts​

When identity is denied, these contexts are removed from events. Their absence, together with the consent context, shows that identity was withheld:

SchemaSet by
iglu:io.surfside.identity/user/jsonschema/…setUser, identifyUser
iglu:io.surfside.identity/uid_context/jsonschema/1-0-0setSurfId