initialiseZeoCollect options. The package uses the strategy for:
- User identification
- Tracking user data
UserDefaults, Android in SharedPreferences) and replay them on subsequent events.
For Default Opt-in and GDPR strategies, only brand consent is honored from
setConsent — the primary track and identify fields are ignored. Primary fields apply only in Custom mode.Default opt-in
Use this when you don’t have a CMP and consent is conveyed by your own server-side logic.| Option | Type | Default | Description |
|---|---|---|---|
opt_out | Boolean | false | Explicit consent signal. When true, the package is fully suppressed. |
GDPR TCF 2.0
Use this when your app integrates a TCF 2.0 CMP for either platform. The native SDKs read the TCF data and query the consent string before recording events.| Option | Type | Default | Description |
|---|---|---|---|
use_consent | Boolean | true | Waits for a consent signal before recording. |
check_for_cmp | Boolean | true | Reads TCF 2.0 variables stored by other CMPs. Set false to use setConsent instead. |
check_zeotap_vendor_consent | Boolean | false | If true, requires Zeotap Vendor consent when resolving GDPR consent. |
purposes_for_tracking | number[] | [1, 3, 4] | TCF purpose IDs that gate tracking. |
purposes_for_identify | number[] | [1, 9] | TCF purpose IDs that gate identification. |
Custom consent
Use this when you want full control — noopt_out shortcut, no TCF API. Supply consent explicitly via setConsent.
setConsent call overrides it.
Primary consent keys (Custom only)
| Key | Type | Description |
|---|---|---|
track | Boolean | true to allow event tracking. |
identify | Boolean | true to allow user matching and third-party enrichment. |
Wait for consent before sending events
Ifuse_consent: true and no consent is set yet, the package queues events and waits. Use listenToAskForConsent to trigger your consent UI:
Granular signaling
You don’t have to grant all signals together:Brand consent
Brand-specific consent (e.g.zeotapVendorConsent, xyzVendorConsent) is honored under any consent strategy and persists across events:
Under Default Opt-in and GDPR modes, only brand consent keys are honored —
track and identify are ignored.Choosing a strategy
Default opt-in
No CMP, simple control via
opt_out.GDPR TCF 2.0
You already have a TCF 2.0 CMP in your app.
Custom
You want granular control and your own consent UI.