Skip to content
adscapi

Consent

Consent is required on every track() call. The two booleans gate whether platforms may use the event for ads measurement and personalization. Optional IAB strings and Limited Data Use travel with the event where a platform documents them.

Shape

ts
type ConversionConsent = {
  adUserData: boolean;          // required
  adPersonalization: boolean;   // required
  gppString?: string;           // IAB GPP (US privacy)
  gppSectionIds?: number[];     // applicable GPP section IDs
  tcfString?: string;           // IAB TCF v2 (EU)
  limitedDataUse?: boolean;     // CCPA / US-state opt-out → LDU where documented
};

Required flags

FieldMeaning
adUserDataUser data may be sent to ad platforms for measurement
adPersonalizationPlatforms may use the event to personalize ads

Pass the values your CMP (or first-party consent store) already collected. Do not hard-code true in production without a real consent signal.

Optional extras

FieldWhen
gppString / gppSectionIdsIAB Global Privacy Platform (US state privacy)
tcfStringIAB TCF v2 (EU/EEA)
limitedDataUseCCPA / US-state opt-out — send the event in Limited Data Use mode where the platform documents it

What platforms receive

  • GA4 always receives Consent Mode (GRANTED/DENIED derived from the booleans) so Google can model conversions under signal loss
  • Meta receives Limited Data Use when limitedDataUse is set
  • GPP/TCF strings are stored on the event and forwarded only where a platform documents the field — never invented

Under iOS ATT and cookie loss, the consent signal is what lets Google and Meta model the conversions they can’t observe directly. Skipping it doesn’t just risk compliance — it lowers attributed conversions.

Example

ts
await ads.conversions.track({
  name: 'purchase',
  value: 49,
  currency: 'USD',
  user: { email: 'jane@example.com' },
  consent: {
    adUserData: true,
    adPersonalization: true,
    // optional extras when you have them:
    // gppString: 'DBABLA~…',
    // gppSectionIds: [7, 8],
    // tcfString: 'CPxxxx…',
    // limitedDataUse: true,   // Meta Limited Data Use
  },
});

Related