adjust-icon

Set up privacy features

Configure features in the Adjust SDK to help handle user privacy in your app.

Send erasure request

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)
local adjust = require "plugin.adjust"
adjust.gdprForgetMe()

Third-party sharing for specific users

You can notify Adjust when a user disables, enables, and re-enables data sharing with third-party partners.

Instantiate the third party sharing table

To enable or disable third-party sharing with the Adjust SDK, create a third-party sharing table and pass it to the trackThirdPartySharing method. You must set the enabled key:

  • enabled (boolean): Whether third-party sharing is enabled. Pass true to enable or false to disable.
local adjust = require "plugin.adjust"
adjust.trackThirdPartySharing({
enabled = true
-- or
-- enabled = false
})

Send granular information

You can attach granular information when a user updates their third-party sharing preferences. Use this to communicate more details about a user’s choice. Add a granularOptions table with the following structure:

  • 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
AppleAds"apple_ads"
Facebook"facebook"
GoogleAds"adwords"
GoogleMarketingPlatform"google_marketing_platform"
Snapchat"snapchat"
Tencent"tencent"
TikTokSan"tiktok_san"
X (formerly Twitter)"twitter"
YahooGemini"yahoo_gemini"
YahooJapanSearch"yahoo_japan_search"
local adjust = require "plugin.adjust"
adjust.trackThirdPartySharing({
enabled = true,
granularOptions = {
{
partnerName = "PartnerName",
key = "key",
value = "value",
},
},
})

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 granularOptions table:

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
local adjust = require "plugin.adjust"
adjust.trackThirdPartySharing({
enabled = true,
granularOptions = {
{
partnerName = "facebook",
key = "data_processing_options_country",
value = "1",
},
{
partnerName = "facebook",
key = "data_processing_options_state",
value = "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.

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.
local adjust = require "plugin.adjust"
adjust.trackThirdPartySharing({
enabled = true,
granularOptions = {
{
partnerName = "google_dma",
key = "eea",
value = "1",
},
{
partnerName = "google_dma",
key = "ad_personalization",
value = "1",
},
{
partnerName = "google_dma",
key = "ad_user_data",
value = "1",
},
},
})

Update partner sharing settings

By default, Adjust shares all metrics with partners you’ve configured in your app settings. You can use the Adjust SDK to update these settings per partner.

Pass a partnerSharingSettings table with the following arguments:

ArgumentData typeDescription
partnerNamestringThe name or ID of the partner. Download the full list of available partners
keystringThe metric to share with the partner
valuebooleanThe user’s decision

You can use the partnerName to specify which partner you want to disable or re-enable sharing of specific metrics. Here,

  • If you want to enable/disable sharing metrics with all the partners that includes SAN, module and dynamic, you can pass all keyword as a partnerName.
  • If you want to enable/disable sharing metrics only with SAN partners, you can pass the name of the SAN partner as a partnerName.
  • If you want to enable/disable sharing metrics with all the partners except SAN partners, you must pass the partner ID as a partnerName.
  • If you want to enable/disable sharing metrics to dynamic partners, you can pass dynamic_callback as a partnerName.

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
  • update
  • att_update
  • event
  • install
  • reattribution
  • reattribution_reinstall
  • reinstall
  • rejected_install
  • rejected_reattribution
  • sdk_click
  • sdk_info
  • session
  • subscription
  • uninstall

Metrics group

When you set a false value against a metric for a partner, Adjust stops sharing the metric along with all the child metrics under the group with the partner. These nested groups are:

  • session
    • install
      • rejected_install
    • reinstall
    • reattribution
    • rejected_reattribution
    • reattribution_reinstall

Here,

  • If you disable sharing of session, all its child metrics will also be disabled.
  • If you disable sharing of session but enable reattribution, all its child metrics except reattribution will be disabled.
  • If you disable sharing of session but enable install, all the child metrics of session except install will be disabled. Child metrics of install will remain enabled.
  • If you enable sharing of session but disable install, all its child metrics of session except install will be enabled. Child metrics of install will remain disabled.

Examples

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

local adjust = require "plugin.adjust"
adjust.trackThirdPartySharing({
enabled = true,
partnerSharingSettings = {
{
partnerName = "PartnerA",
key = "all",
value = false
},
},
})

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

local adjust = require "plugin.adjust"
adjust.trackThirdPartySharing({
enabled = true,
partnerSharingSettings = {
{
partnerName = "PartnerA",
key = "all",
value = true
},
},
})

If you want to share data only with PartnerA, you need to pass:

  • all key for all partners with a false value to disable sharing all information for all the partners.
  • all key for PartnerA with a true value to enable sharing all the information for PartnerA explicitly.
local adjust = require "plugin.adjust"
adjust.trackThirdPartySharing({
enabled = true,
partnerSharingSettings = {
{
partnerName = "all",
key = "all",
value = false
},
{
partnerName = "PartnerA",
key = "all",
value = true
},
},
})

If you want to share only session data with all the partners, you need to pass:

  • all key for all partners with a false value to disable sharing all information for all the partners.
  • session key for all partners with a true value to enable sharing session data and all its related “child” metrics for all the partners.
local adjust = require "plugin.adjust"
adjust.trackThirdPartySharing({
enabled = true,
partnerSharingSettings = {
{
partnerName = "all",
key = "all",
value = false
},
{
partnerName = "all",
key = "session",
value = true
},
},
})

If you want to share only session data with PartnerA, you need to pass:

  • all key for all partners with a false value to disable sharing all information for all the partners.
  • session key for PartnerA partners with a true value to enable sharing session data and all its related “child” metrics for PartnerA the partners.
local adjust = require "plugin.adjust"
adjust.trackThirdPartySharing({
enabled = true,
partnerSharingSettings = {
{
partnerName = "all",
key = "all",
value = false
},
{
partnerName = "PartnerA",
key = "session",
value = true
},
},
})

If you want to disable dynamic_callbacks, pass the all key with a false value.

local adjust = require "plugin.adjust"
adjust.trackThirdPartySharing({
enabled = true,
partnerSharingSettings = {
{
partnerName = "dynamic_callbacks",
key = "all",
value = false
}
},
})

You can stop or start sharing specific metrics by setting the partnerSharingSetting key. 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
local adjust = require "plugin.adjust"
adjust.trackThirdPartySharing({
enabled = true,
partnerSharingSettings = {
{
partnerName = "all",
key = "all",
value = false
},
{
partnerName = "PartnerA",
key = "event",
value = true
},
},
})

Set URL strategy

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, you need to set 3 keys inside of your configuration table:

  • urlStrategyDomains (table): The country or countries of data residence, or the endpoints to which you want to send SDK traffic.
  • useSubdomains (boolean): Whether the domain should be treated as an Adjust domain. If true, the SDK will prefix the domains with Adjust-specific subdomains. If false, the SDK will use the provided domain as-is, without adding any prefixes.
  • isDataResidency (boolean): Whether the domain should be used for data residency.
IR: strategyMain and fallback domainUse sub domainsIs Data Residency
EU data residency"eu.adjust.com"truetrue
Turkish data residency"tr.adjust.com"truetrue
US data residency"us.adjust.com"truetrue
China global URL strategy"adjust.world", "adjust.com"truefalse
China URL strategy"adjust.cn", "adjust.com"truefalse
China only URL strategy"adjust.cn"truefalse
India URL strategy"adjust.net.in", "adjust.com"truefalse

Examples

India URL strategy
-- India URL strategy
local adjust = require "plugin.adjust"
adjust.initSdk({
appToken = "2fm9gkqubvpc",
environment = "SANDBOX",
logLevel = "VERBOSE",
-- URL strategy parameters below
urlStrategyDomains = { "adjust.net.in", "adjust.com" },
useSubdomains = true,
isDataResidency = false
})
China URL strategy
-- China global URL strategy
local adjust = require "plugin.adjust"
adjust.initSdk({
appToken = "2fm9gkqubvpc",
environment = "SANDBOX",
logLevel = "VERBOSE",
-- URL strategy parameters below
urlStrategyDomains = { "adjust.world", "adjust.com" },
useSubdomains = true,
isDataResidency = false
})
China only URL strategy
-- China only URL strategy
local adjust = require "plugin.adjust"
adjust.initSdk({
appToken = "2fm9gkqubvpc",
environment = "SANDBOX",
logLevel = "VERBOSE",
-- URL strategy parameters below
urlStrategyDomains = { "adjust.cn" },
useSubdomains = true,
isDataResidency = false
})
EU data residency
-- EU data residency
local adjust = require "plugin.adjust"
adjust.initSdk({
appToken = "2fm9gkqubvpc",
environment = "SANDBOX",
logLevel = "VERBOSE",
-- URL strategy parameters below
urlStrategyDomains = { "eu.adjust.com" },
useSubdomains = true,
isDataResidency = true
})
Turkey data residency
-- Turkey data residency
local adjust = require "plugin.adjust"
adjust.initSdk({
appToken = "2fm9gkqubvpc",
environment = "SANDBOX",
logLevel = "VERBOSE",
-- URL strategy parameters below
urlStrategyDomains = { "us.adjust.com" },
useSubdomains = true,
isDataResidency = true
})
US data residency
-- US data residency
local adjust = require "plugin.adjust"
adjust.initSdk({
appToken = "2fm9gkqubvpc",
environment = "SANDBOX",
logLevel = "VERBOSE",
-- URL strategy parameters below
urlStrategyDomains = { "us.adjust.com" },
useSubdomains = true,
isDataResidency = true
})

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 your data privacy settings to Adjust’s servers. Adjust then applies your configured data privacy rules to that user. The SDK continues to function normally.

local adjust = require "plugin.adjust"
adjust.trackMeasurementConsent(true)
-- or
adjust.trackMeasurementConsent(false)

Privacy for children

The Adjust SDK includes the com.google.android.gms.permission.AD_ID permission by default. 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

If your app must comply with the Children’s Online Privacy Protection Act (COPPA), set isCoppaComplianceEnabled to true in your configuration table. Doing this:

  1. Disables third-party sharing before the first session is launched.
  2. Prevents the SDK from reading device and advertising IDs (for example: gps_adid and android_id).
local adjust = require "plugin.adjust"
adjust.initSdk({
appToken = "YourAppToken",
environment = "SANDBOX",
logLevel = "VERBOSE",
isCoppaComplianceEnabled = true
})

By default, COPPA compliance is disabled when initializing the SDK.

Play Store Kids Apps (Android only)

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).

Set isPlayStoreKidsComplianceEnabled to true in your configuration table:

local adjust = require "plugin.adjust"
adjust.initSdk({
appToken = "YourAppToken",
environment = "SANDBOX",
logLevel = "VERBOSE",
isPlayStoreKidsComplianceEnabled = true
})