Skip to main content

Default Consent Behavior

This section describes the default behavior of the Zeotap Android SDK when you initialize it without explicitly enabling consent management features (i.e., when the useConsent configuration option is false, which is its default value).

How it Works

In this default mode, the SDK's tracking and data collection activities are primarily controlled by the optOut configuration option.

  • optOut: false (Default):

    • If you initialize the SDK without specifying useConsent(true) or optOut(true), the SDK assumes it has permission to operate fully.
    • It will track user activities (screen views, events).
    • It will process and store user identities provided via setUserIdentities.
    • It will send user properties and page properties.
  • optOut: true:

    • If you explicitly set optOut(true) during initialization, the SDK will be significantly restricted, effectively acting as a global "do not track" for the SDK in your app.
    • No tracking events will be sent to Zeotap.
    • User identification calls will be ignored.
    • All data collection functions will be disabled.

Interaction with setConsent API

When the SDK is operating in this default mode (useConsent: false), calls to the setConsent() function have limited effect:

  • The track parameter within the setConsent map is ignored. Setting it to true or false will have no impact on the SDK's tracking behavior, which remains governed by the optOut option.
  • However, any Brand Consents included in the setConsent call (e.g., { "myBrandConsent": true }) will still be processed, stored, and sent with subsequent events under the z_p query parameter of tracking requests.

Example

// SDK Initialization (Default Mode - Tracking Enabled)
CollectOptions options = CollectOptions.builder(this)
.credential("YOUR_WRITE_KEY")
.build();

Collect.init(options);

// The SDK will start tracking immediately after initialization

Default Mode with OptOut

// SDK Initialization with Global Opt-Out
CollectOptions options = CollectOptions.builder(this)
.credential("YOUR_WRITE_KEY")
.optOut(true) // Disable all tracking
.build();

Collect.init(options);

// No tracking will occur, even if setConsent is called
Map<String, Object> consentData = new HashMap<>();
consentData.put("track", true); // This will be ignored due to optOut: true

Collect.getInstance().setConsent(consentData);
// Even in default mode, brand consents are processed
CollectOptions options = CollectOptions.builder(this)
.credential("YOUR_WRITE_KEY")
.build();

Collect.init(options);

// Brand consents will be collected and sent
Map<String, Object> consentData = new HashMap<>();
consentData.put("track", false); // Ignored in default mode
consentData.put("newsletterOptIn", true); // This will be processed
consentData.put("marketingConsent", false); // This will be processed

Collect.getInstance().setConsent(consentData);

When to Use Default Mode

Recommended for:

  • Apps that don't operate under strict privacy regulations
  • Internal/enterprise apps with pre-agreed data collection terms
  • Apps in regions without explicit consent requirements
  • Development and testing environments

Not recommended for:

  • Apps distributed in EU/GDPR regions
  • Apps subject to CCPA or similar privacy laws
  • Consumer-facing apps that prioritize user privacy
  • Apps that need granular consent management