At a glance: Configure additional user identifiers for sending custom audiences to advertising partners.
About additional identifiers
AppsFlyer Audiences automatically supports the following device identifiers for sending custom audiences to advertising partners:
- iOS: IDFA
- Android (Google Play): GAID
- Android (3rd-party app stores): OAID and IMEI
Some advertising partners also support custom audience matching based on additional user identifiers. Audiences offers you the option to utilize these identifiers if you specifically configure them through the AppsFlyer SDK or S2S-mobile API.
Such additional identifiers can include phone numbers and emails, but can only be used if encrypted with SHA256 hashing. Your use of such additional identifiers is subject to the Additional Identifiers Terms of Use.
Next Steps
- Select the additional identifiers you want to use (if any) from the table of available identifiers. Note that not all advertising partners support all identifiers.
- Developers—Configure the selected identifiers, using:
- Parameters and formatting requirements as appear in the table of available identifiers
- The reference and code samples for SDK and S2S
- In the Audiences dashboard:
- Set your account-level user identifier policy
- Select the identifiers to be uploaded in each of your partner connections
Available identifiers
You can elect to configure one or more identifiers, shown in the table below.
Additional identifiers—parameters and formatting
Identifier | Parameter name | Format | Example value (before hashing) |
---|---|---|---|
Email address | email_sha256 |
|
name@domain.com |
Phone number (see note below) |
phone_number_sha256 |
|
442070313000 |
Phone number E164 (see note below) |
phone_number_e164_sha256 |
|
+442070313000 |
NoteDifferent advertising partners support different phone number formats. So, if you choose to utilize phone number, configure both identifiers: Phone number and Phone number E164. |
SDK reference and code samples
When sending identifiers for Audiences via the SDK:
- For identifiers other than hashed Email address, use
setAdditionalData
- For hashed Email address, use
setUserEmails
iOS SDK configuration
To set hashed Phone number as an additional user identifier:
NSDictionary *customData = @{
@"audiences": @{
@"phone_number_sha256": @"6C91C4C640F6EF0162833260DB4F13DEC0DF2B683092F4DBA7E874BEF1ACEA37",
@"phone_number_e164_sha256":@"F3D7E96C73FB0DE1B66ACFCE541D7AF758FBD4F3FA3AF0EA4E10110000D3625E"
}
};
[[AppsFlyerLib shared] setAdditionalData:customData];
let customData: Dictionary = [
“audiences” : [
"phone_number_sha256":"6C91C4C640F6EF0162833260DB4F13DEC0DF2B683092F4DBA7E874BEF1ACEA37",
"phone_number_e164_sha256":"F3D7E96C73FB0DE1B66ACFCE541D7AF758FBD4F3FA3AF0EA4E10110000D3625E"
]
]
AppsFlyerLib.shared().customData = customData
To set hashed Email address as an additional user identifier:
Method signature |
|
Usage example |
|
Android SDK configuration
To set hashed Phone number as an additional user identifier:
HashMap<String, Object> audiences = new HashMap<>();
audiences.put("phone_number_sha256", "6C91C4C640F6EF0162833260DB4F13DEC0DF2B683092F4DBA7E874BEF1ACEA37");
audiences.put("phone_number_e164_sha256", "F3D7E96C73FB0DE1B66ACFCE541D7AF758FBD4F3FA3AF0EA4E10110000D3625E");
HashMap<String, Object> customDataMap = new HashMap<>();
customDataMap.put("audiences", audiences);
AppsFlyerLib.getInstance().setAdditionalData(customDataMap);
val audiences = hashMapOf<String, Any>(
"phone_number_sha256" to "6C91C4C640F6EF0162833260DB4F13DEC0DF2B683092F4DBA7E874BEF1ACEA37",
"phone_number_e164_sha256" to "F3D7E96C73FB0DE1B66ACFCE541D7AF758FBD4F3FA3AF0EA4E10110000D3625E"
)
val customDataMap = hashMapOf<String, Any>("audiences" to audiences)
AppsFlyerLib.getInstance().setAdditionalData(customDataMap)
To set hashed Email address as an additional user identifier:
Method signature |
|
Usage example |
|
S2S reference and code samples
When sending identifiers for Audiences via S2S, use the custom_data
parameter for all identifiers (including hashed Email address). You can send one or more identifiers.
Sending identifiers via S2S
Format:
- Nested JSON
- The key value must be
audiences
- All values must be stringified as shown in the following code example
- Parameter names must match those listed in the table of available identifiers, above
Generic format:
"custom_data" : {
\"audiences\" : {
\"parameter_name_a\" : \"hashed_identifer_a\",
\"parameter_name_a\" : \"hashed_identifer_b\",
\"parameter_name_c\" : \"hashed_identifer_c\"
}
}
Populated example for hashed Phone number and hashed Email address:
"custom_data" : {
\"audiences\" : {
\"phone_number_sha256\" : \"6C91C4C640F6EF0162833260DB4F13DEC0DF2B683092F4DBA7E874BEF1ACEA37\",
\"phone_number_e164_sha256\" : \"F3D7E96C73FB0DE1B66ACFCE541D7AF758FBD4F3FA3AF0EA4E10110000D3625E\",
\"email_sha256\" : \"34D31BE18022626DE6B311D6A76E791176D2691B6EEF406F524D8F56364C187A\"
}
}