adjust-icon

Set up privacy features

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

Send right to be forgotten request

Method signature
gdprForgetMe(): void

Article 17 of the European Union’s General Data Protection Regulation (GDPR) grants users the right to be forgotten. When Adjust’s servers receive a Right to be Forgotten (RTBF) request, Adjust erases the user’s data. The SDK also stops sending requests from the device for the app in question.

You can send the user’s RTBF request to Adjust by calling the gdprForgetMe method.

Adjust.gdprForgetMe();

Third-party sharing for specific users

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

Instantiate an AdjustThirdPartySharing object

Method signature
constructor(isEnabled: boolean)

To enable or disable third party sharing with the Adjust SDK, you need to instantiate an AdjustThirdPartySharing object. This object contains variables that control how third party sharing is handled by Adjust.

To instantiate a third party sharing object, create a new AdjustThirdPartySharing instance and pass the following parameters:

  • isEnabled (boolean): Whether third party sharing is enabled. Pass true to enable third party sharing or false to disable third party sharing
var adjustThirdPartySharing = new AdjustThirdPartySharing(true);

Once you’ve instantiated your AdjustThirdPartySharing object, you can send the information to Adjust by calling the Adjust.trackThirdPartySharing method with your AdjustThirdPartySharing instance as an argument.

var adjustThirdPartySharing = new AdjustThirdPartySharing(true);
Adjust.trackThirdPartySharing(adjustThirdPartySharing);

Send granular information

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

You can attach granular information when a user updates their third-party sharing preferences. Use this information to communicate more detail about a user’s decision. To do this, 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.

The following partners are available:

Partner nameString value
AppleAdsapple_ads
Facebookfacebook
GoogleAdsadwords
GoogleMarketingPlatformgoogle_marketing_platform
Snapchatsnapchat
Tencenttencent
TikTokSantiktok_san
X (formerly Twitter)twitter
YahooGeminiyahoo_gemini
YahooJapanSearchyahoo_japan_search
var adjustThirdPartySharing = new AdjustThirdPartySharing(true);
adjustThirdPartySharing.addGranularOption("PartnerA", "key", "value");
Adjust.trackThirdPartySharing(adjustThirdPartySharing);

Manage Facebook Limited Data Use

Facebook provides a feature called Limited Data Use (LDU) to comply with the California Consumer Privacy Act (CCPA). This feature enables you to notify Facebook when a California-based user is opted out of the sale of data. You can also use it if you want to opt all users out by default.

You can update the Facebook LDU status by passing the following arguments to the addGranularOption method:

ParameterDescription
partner_nameUse facebook to toggle LDU.
data_processing_options_countryThe country in which the user is located.
  • 0: Request that Facebook use geolocation.
  • 1: United States of America.
data_processing_options_stateNotifies Facebook in which state the user is located.
  • 0: Request that Facebook use geolocation.
  • 1000: California.
  • 1001: Colorado
  • 1002: Connecticut
var adjustThirdPartySharing = new AdjustThirdPartySharing(true);
adjustThirdPartySharing.addGranularOption(
"facebook",
"data_processing_options_country",
"1",
);
adjustThirdPartySharing.addGranularOption(
"facebook",
"data_processing_options_state",
"1000",
);
Adjust.trackThirdPartySharing(adjustThirdPartySharing);
Added in v4.26.0

To comply with the EU’s Digital Markets Act (DMA), Google Ads and the Google Marketing Platform require explicit consent to receive Adjust’s attribution requests to their APIs. To communicate this consent, you need to add the following granular options to your third party sharing instance for the partner google_dma.

KeyValueDescription
eea1 (positive) | 0 (negative)Informs Adjust whether users installing the app are within the European Economic Area.
This includes EU member states, Switzerland, Norway, Iceland and Slovenia.
ad_personalization1 (positive) | 0 (negative)Informs Adjust whether users consented with being served personalized ads via Google Ads and/or Google Marketing Platform.
This parameter also informs the npa parameter reserved for Google Marketing Platform.
ad_user_data1 (positive) | 0 (negative)Informs Adjust whether users consented with their advertiser ID being leveraged for attribution purposes.
var adjustThirdPartySharing = new AdjustThirdPartySharing(true);
adjustThirdPartySharing.addGranularOption("google_dma", "eea", "1");
adjustThirdPartySharing.addGranularOption(
"google_dma",
"ad_personalization",
"1",
);
adjustThirdPartySharing.addGranularOption("google_dma", "ad_user_data", "1");
Adjust.trackThirdPartySharing(adjustThirdPartySharing);

Update partner settings

Method signature
addPartnerSharingSetting(partnerName: string, key: string, value: boolean): void

You can use the Adjust SDK to update your third party sharing settings on a per-partner basis. To do this, call the addPartnerSharingSetting method with your partner name and your options.

var adjustThirdPartySharing = new AdjustThirdPartySharing(true);
adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "foo", false);
Adjust.trackThirdPartySharing(adjustThirdPartySharing);

Disable third-party sharing

Method signature
disableThirdPartySharing(): void

To disable third-party sharing for all users, call the disableThirdPartySharing method. When Adjust’s servers receive this information, Adjust stops sharing the user’s data with third-parties. The Adjust SDK continues to work as expected.

Adjust.disableThirdPartySharing();

Set URL strategy

Method signature
setUrlStrategy(urlStrategy: AdjustUrlStrategy)

The URL strategy feature allows you to set either:

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

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 set your country of data residency, assign one of the following URL strategies to the urlStrategy property of your config instance.

ValueDescription
AdjustConfig.DataResidencyEUSets the area of data residency to the EU
AdjustConfig.DataResidencyTRSets the area of data residency to Turkey
AdjustConfig.DataResidencyUSSets the area of data residency to the USA
AdjustConfig.UrlStrategyChinaPoints the URL strategy to the app.adjust.world domain
AdjustConfig.UrlStrategyCnPoints the URL strategy to the app.adjust.cn domain
AdjustConfig.UrlStrategyIndiaPoints the URL strategy to the app.adjust.net.in domain
var adjustConfig = new AdjustConfig(
"{YourAppToken}",
AdjustConfig.EnvironmentSandbox,
);
adjustConfig.setUrlStrategy(AdjustConfig.DataResidencyEU);
Adjust.create(adjustConfig);
Method signature
trackMeasurementConsent(measurementConsent: boolean): void

If you’re using Data Privacy settings in your Adjust dashboard, you need to set up the Adjust SDK to work with them. This includes settings such as consent expiry period and user data retention period.

To toggle this feature, call the trackMeasurementConsent method with the following argument:

  • measurementConsent (boolean): Whether consent measurement is enabled (true) or not (false).

When enabled, the SDK communicates the data privacy settings to Adjust’s servers. Adjust’s servers then applies your data privacy rules to the user. The Adjust SDK continues to work as expected.

Adjust.trackMeasurementConsent(true);

Privacy for children

Changed in v4.32.0

The Adjust SDK includes the com.google.android.gms.permission.AD_ID permission by default in version 4.32.0 and above. You can remove it by adding a remove directive if need to make your app COPPA-compliant or if you don’t target the Google Play Store.

AndroidManifest.xml
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>

See Google’s AdvertisingIdClient.Info documentation for more information about this permission.

COPPA compliance

Method signature
setCoppaCompliantEnabled(coppaCompliantEnabled: boolean)

If you need your app to be compliant with the Children’s Online Privacy Protection Act (COPPA), assign a boolean value to the coppaCompliantEnabled property on your config instance. Setting this property to true:

  1. Disables third-party sharing before the user launches their first session.
  2. Prevents the SDK from reading device and advertising IDs (for example: gps_adid and android_id).
var adjustConfig = new AdjustConfig(
"{YourAppToken}",
AdjustConfig.EnvironmentSandbox,
);
adjustConfig.setCoppaCompliantEnabled(true);
Adjust.create(adjustConfig);

You can disable COPPA compliance by calling this method with a false argument.

Play Store Kids Apps (Android only)

Method signature
setPlayStoreKidsAppEnabled(playStoreKidsAppEnabled: boolean)

If your app targets users under the age of 13, and the install region isn’t the USA, you need to mark it as a Kids App. This prevents the SDK from reading device and advertising IDs (for example: gps_adid and android_id).

To mark your app as a Kids App, assign a boolean value to the playStoreKidsAppEnabled property on your config instance. Set to true to mark the app as a Kids App, or false to mark the app as a non-Kids App.

var adjustConfig = new AdjustConfig(
"{YourAppToken}",
AdjustConfig.EnvironmentSandbox,
);
adjustConfig.setPlayStoreKidsAppEnabled(true);
Adjust.create(adjustConfig);