adjust-icon

First session delay

The First Session Delay feature allows you to delay SDK initialization during the very first SDK session only. While in this delay mode, the Adjust SDK records all activity (such as installs and events) in memory, but does not transmit any data to Adjust servers.

This gives your app an opportunity to gather additional data that may not be available at launch and, if needed, modify the SDK configuration before any data is sent. Once the delay ends, SDK will apply all the settings configured during the delay before tracking an install.

When and Why to Use First Session Delay

Use this feature if you need to:

  • Set COPPA compliance for the user.
  • Indicate that the user falls under the Play Store’s “Designed for Families” (kids) category.
  • Assign an external device ID.

In addition to the features supported by a dedicated first session delay API, you can also perform the following actions during the delay:

Enabling First Session Delay

To initialize the SDK in delayed mode, use the following setup:

var adjustConfig = new AdjustConfig(
"{YourAppToken}",
AdjustConfig.EnvironmentSandbox,
);
adjustConfig.enableFirstSessionDelay();
Adjust.initSdk(adjustConfig);

After this, the SDK will be initialized in memory and will not process anything until you explicitly call:

Adjust.endFirstSessionDelay();

Configuration changing while on delay

Set COPPA compliance

While the SDK is in first session delay mode, it is possible to change COPPA compliance, as if it were set in the config during initSdk.

To enable COPPA compliance:

Adjust.enableCoppaComplianceInDelay();

To disable COPPA compliance:

Adjust.disableCoppaComplianceInDelay();

Set Play Store kids compliance

While the SDK is in first session delay mode, it is possible to change Play Store kids compliance, as if it were set in the config during initSdk.

To enable Play Store kids compliance:

Adjust.enablePlayStoreKidsComplianceInDelay();

To disable Play Store kids compliance:

Adjust.disablePlayStoreKidsComplianceInDelay();

Set external device ID

While the SDK is in first session delay mode, it is possible to set the external device ID, as if it were configured during initSdk.

To set the external device ID:

Adjust.setExternalDeviceIdInDelay("YourExternalDeviceId");