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
static void gdprForgetMe();

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.


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 AdjustThirdPartySharing2dx class.

Instantiate an AdjustThirdPartySharing2dx object

Method signature
AdjustThirdPartySharing2dx(bool isEnabled)

To enable or disable third party sharing with the Adjust SDK, you need to instantiate an AdjustThirdPartySharing2dx 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 AdjustThirdPartySharing2dx 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
AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true);

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

AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(false);

Send granular information

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

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:

AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true);
adjustThirdPartySharing.addGranularOption("PartnerA", "foo", "bar");

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:

AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true);
adjustThirdPartySharing.addGranularOption("facebook", "data_processing_options_country", "1");
adjustThirdPartySharing.addGranularOption("facebook", "data_processing_options_state", "1000");

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.

AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true);
adjustThirdPartySharing.addGranularOption('google_dma', 'eea', '1');
adjustThirdPartySharing.addGranularOption('google_dma', 'ad_personalization', '1');
adjustThirdPartySharing.addGranularOption('google_dma', 'ad_user_data', '1');

Update partner sharing settings

Method signature
void addPartnerSharingSetting(std::string partnerName, std::string key, bool value);

By default, Adjust shares all metrics with any partners you’ve configured in your app settings. 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 the following arguments:

You can use the key to specify which metrics you want to disable or re-enable. If you want to enable/disable sharing all metrics, you can use the all key. The full list of available metrics is available below:

  • ad_revenue
  • all
  • attribution
  • update
  • att_update
  • cost_update
  • event
  • install
  • reattribution
  • reattribution_reinstall
  • reinstall
  • rejected_install
  • rejected_reattribution
  • sdk_click
  • sdk_info
  • session
  • subscription
  • uninstall

When you set a false value against a metric for a partner, Adjust stops sharing the metric with the partner.


If you want to stop sharing all metrics with a specific partner, pass the all key with a false value.

AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true);
adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", false);

To re-enable sharing, pass the all key with a true value.

AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true);
adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", true);

You can stop or start sharing specific metrics by calling the addPartnerSharingSetting method multiple times with different keys. For example, if you only want to share event information with a partner, you can pass:

  • all with a false value to disable sharing all information.
  • event with a true value to enable event sharing
AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true);
adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", false);
adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "event", true);

Disable third-party sharing

Method signature
static void disableThirdPartySharing();

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.


Set URL strategy

Method signature
void setUrlStrategy(std::string urlStrategy);

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, call the setUrlStrategy method on your AdjustConfig2dx instance with the following parameter:

  • urlStrategy (String): The country of data residence or endpoint to which you want to send SDK traffic.
AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment);
Method signature
static void trackMeasurementConsent(bool measurementConsent);

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.


Privacy for children

The Adjust SDK includes the 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.

<uses-permission android:name="" tools:node="remove"/>

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

COPPA compliance

Method signature
void setCoppaCompliantEnabled(bool isEnabled);

If you need your app to be compliant with the Children’s Online Privacy Protection Act (COPPA), call the setCoppaCompliantEnabled method. This method performs the following actions:

  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).
AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment);

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

Play Store Kids Apps (Android only)

Method signature
void setPlayStoreKidsAppEnabled(bool isEnabled);

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, call the setPlayStoreKidsAppEnabled method with the following argument:

  • playStoreKidsAppEnabled (Boolean): set to true to mark the app as a Kids App, or false to mark the app as a non-Kids App.
AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment);