adjust-icon

Set up privacy features

The Adjust SDK contains features that you can use to handle user privacy in your app.

Send erasure request

Method signature
function gdprForgetMe(): void;

The EU’s General Data Protection Regulation (GDPR) and similar privacy laws worldwide (CCPA, LGPD, etc.) grant data subjects comprehensive rights when it comes to the processing of their personal data. These rights include, among others, the right to erasure (see Art. 17 GDPR)(1). As a data processor, Adjust is obliged to support you (the data controller) in the processing of such requests from your (app) users.

You can send the user’s erasure request to Adjust by calling the gdprForgetMe method. Once Adjust has been notified:

  • Adjust will permanently delete all of the user’s historical personal data from its internal systems and database.
  • Adjust will no longer receive data from this user/device via the Adjust SDK.(2)
Adjust.gdprForgetMe();

Third-party sharing for specific users

Added in 5.7.0

You can use the Adjust SDK to record when a user changes their third-party sharing settings. These settings are configured using the ThirdPartySharing class.

Instantiate an AdjustThirdPartySharing object

Method signature
class ThirdPartySharing {
constructor(isEnabled: boolean) {}
// ...
}

To enable or disable third-party sharing with the Adjust SDK, instantiate the ThirdPartySharing object. This object contains variables that control how Adjust handles third-party sharing.

To instantiate it, create a new ThirdPartySharing instance and pass the following parameter:

  • isEnabled (boolean): Pass true to enable third-party sharing or false to disable it.
const adjustThirdPartySharing = new Adjust.ThirdPartySharing(true);

When set to false, Adjust stops sharing the user’s data with third parties. The Adjust SDK continues to work as expected.

To send the information to Adjust, call the Adjust.trackThirdPartySharing method with your ThirdPartySharing instance as an argument.

const adjustThirdPartySharing = new Adjust.ThirdPartySharing(true);
Adjust.trackThirdPartySharing(adjustThirdPartySharing);

Disable third-party sharing (Deprecated)

Removed in 5.7.0

To disable third-party sharing in previous versions of the SDK, call the disableThirdPartySharing method. This method is deprecated. If you still use it, note that it calls the underlying method directly.

const adjustThirdPartySharing = new Adjust.ThirdPartySharing(false);
Adjust.trackThirdPartySharing(adjustThirdPartySharing);

Send granular information

Method signature
public addGranularOption(partnerName: string,
key: string,
value: string)

You can attach granular information when a user updates their third-party sharing preferences. This allows you to communicate more detail about a user’s decision.

Call the addGranularOption method with the following parameters:

  • partnerName (string): The name of the partner for whom the granular option applies.
  • key (string): The option key.
  • value (string): The option value.
const adjustThirdPartySharing = new Adjust.ThirdPartySharing(true);
options.addGranularOption("PartnerA", "foo", "bar");
Adjust.trackThirdPartySharing(options);

URL strategy

Changed in 5.7.0

The URL strategy feature allows you to set:

  • The country in which Adjust stores your data (data residency).
  • The endpoint to which the Adjust SDK sends traffic (custom URL).

This is useful if you’re operating in a country with strict privacy requirements. When you set your URL strategy, Adjust stores data in the selected data residency region or sends traffic to the chosen domain.

To configure the URL strategy, set the following properties of urlStrategy in your Adjust.initSdk instance:

  • domains (Array<string>): The country or countries of data residence, or the endpoints to which you want to send SDK traffic. By default, the Adjust SDK sends all data to Adjust’s endpoints. If you want to set a custom endpoint, pass it in the domains property of urlStrategy.
  • useSubdomains (boolean): Whether the domain should be treated as an Adjust domain.
    • If true, the SDK will prefix the domain with Adjust-specific subdomains.
    • If false, the SDK will use the provided domain as-is, without prefixes.
  • isDataResidency (boolean): Optional. Whether the domain should be used for data residency.

The following table demonstrates a list of configurations.

URL strategyDefault and custom domainsUse sub domainsData residency
EU data residency"eu.adjust.com"truetrue
China URL strategy"adjust.cn", "adjust.com"truefalse
Custom URL strategy"my.custom.domain"falsefalse
Adjust.initSdk({
appToken: "YOUR_APP_TOKEN",
environment: "production",
logLevel: "verbose",
urlStrategy: {
domains: ["adjust.cn", "adjust.com"],
useSubdomains: true,
isDataResidency: false,
},
});

Set custom endpoint (Deprecated)

Removed in 5.7.0

Previous versions of the SDK passed the endpoint using the customUrl property, which is deprecated. Use the urlStrategy configuration instead.

Adjust.initSdk({
appToken: "YOUR_APP_TOKEN",
environment: "production",
logLevel: "verbose",
customUrl: "my.custom.domain.com",
urlStrategy: {
domains: ["my.custom.domain"],
useSubdomains: false,
isDataResidency: false,
},
});

Data residency (Deprecated)

Removed in 5.7.0

Previous versions of the SDK used the dataResidency property, which is deprecated. Use the urlStrategy configuration instead.

Adjust.initSdk({
appToken: "YOUR_APP_TOKEN",
environment: "production",
logLevel: "verbose",
dataResidency: "EU",
urlStrategy: {
domains: ["eu.adjust.com"],
useSubdomains: true,
isDataResidency: true,
},
});