Consent Object
Overview
The consent object defines the user's explicit preferences regarding data collection and processing. It ensures that all downstream processing, reporting, and platform integrations respect the user's privacy choices.
It contains three required boolean categories that control data usage, plus two optional fields:
- analytics — consent for collecting data used in performance monitoring and usage statistics
- personalization — consent for collecting data used to tailor user experiences and customize content
- marketing — consent for collecting data used in advertising, remarketing, and campaign measurement
- id (optional) — a stable identifier from your CMP (or any internal reference) that links the consent record to a verifiable source. Required when the audit-trail persistence feature is enabled on the account.
- timestamp (optional, webhooks) — when the visitor granted consent, in milliseconds. It is used as the visitor's first-seen time; if missing, the event timestamp is used. In the browser it is set automatically.
The values you send in the consent object directly influence what DATA Reshape is allowed to forward from the other objects in the same payload — primarily fields considered PII (email, phone, names, address) in the user object, and identifiers in cookies and context. The exact restrictions per consent category are defined at account setup and can vary per destination. Consider this object the gatekeeper for everything else in the payload, not just an informational flag.
Complete Reference
consent object
analytics boolean required
Indicates the user’s explicit consent regarding the collection and processing of data for analytical purposes, such as performance monitoring, usage statistics, and service optimization.
analytics: true
personalization boolean required
Indicates the user’s explicit consent regarding the collection and processing of data for personalization purposes, enabling tailored experiences and content customization.
personalization: true
marketing boolean required
Indicates the user’s explicit consent regarding the collection and processing of data for marketing purposes, such as targeted advertising, remarketing, and campaign measurement.
marketing: true
id string
Optional consent-record identifier. When present, DATA Reshape can persist or relay the consent decision under this ID — useful when you want each stored decision to be tied to a verifiable reference from your Consent Management Platform (CMP consent ID, IAB TC string hash, internal record ID, etc.). Required when the optional audit-trail persistence feature is enabled on the account.
id: "consent_record_abc123"
timestamp number
Optional. The moment the visitor granted consent, as a Unix timestamp in milliseconds (seconds are accepted and converted). DATA Reshape uses it as the visitor's first-seen time, keeping the oldest value it has. If you don't send it, the event timestamp is used instead.
Send it on server-to-server webhooks. In the browser, DATA Reshape sets this value itself and ignores any timestamp sent through reshape.push.
timestamp: 1759651200000
Examples
- Standard
- With consent id
- With timestamp (webhook)
{
"analytics": true,
"personalization": false,
"marketing": true
}
The common shape — three required boolean categories. Use this when you do not need to persist a consent-record reference for audit purposes.
{
"analytics": true,
"personalization": false,
"marketing": true,
"id": "consent_record_abc123"
}
Add id when your account has audit-trail persistence enabled, or when you want each stored consent decision tied to a verifiable reference from your CMP (CMP consent ID, IAB TC string hash, internal record ID, etc.).
{
"analytics": true,
"personalization": false,
"marketing": true,
"timestamp": 1759651200000
}
On server-to-server webhooks, add timestamp with the moment the visitor granted consent (milliseconds). DATA Reshape uses it as the visitor's first-seen time; without it, the event timestamp is used. In the browser you don't need to send it — it is set automatically.