Developers must not include any personal data, including demographic or interest-based targeting data, in any fields intended for contextual targeting (i.e. keywords or based on the content of the app). Additionally, developers must not send AppLovin any sensitive personal data or custom data values that are against the AppLovin Terms of Use or AppLovin Privacy Policy.
Starting with SDK version 11.0.0, AppLovin provides an option for developers to send additional data. Developers should send any demographic or interest-based targeting data in the fields designated for such data, as described below.
Data Fields
Set values for the following fields to pass personal data (for demographic or interest-based targeting):
Field | Description |
---|---|
This data is limited to use by publishers for the publishers’ own direct ad serving. AppLovin does not retain this data or pass it downstream to advertising partners. | |
The user’s email address. AppLovin hashes this value before it reaches its ad server. | |
gender | The user’s gender |
interests | A list of the user’s interests |
maximumAdContentRating | The maximum ad content rating shown to the user. The levels are based on IQG Media Ratings: 1 = All Audiences, 2 = Everyone Over 12, 3 = Mature Audiences |
phoneNumber | The user’s phone number. AppLovin hashes this value before it reaches its ad server. |
yearOfBirth | The user’s year of birth |
Set values for the following fields to pass impersonal data (for contextual targeting):
Field | Description |
---|---|
keywords | A list of keywords related to your application |
Here is an example of how to set the user’s email address and the keywords that describe your application:
-
ALSdk.shared.targetingData.email = @"user@email.com"; ALSdk.shared.targetingData.keywords = @[@"fruit:apple", @"fruit:banana", @"fruit:orange"];
-
ALSdk.shared()!.targetingData.email = "user@email.com" ALSdk.shared()!.targetingData.keywords = ["fruit:apple", "fruit:banana", "fruit:orange"]
Once you set any of these fields, the SDK includes them each time you request an AppLovin ad. You can clear these fields at any time, and the SDK then removes them before the next time you request an AppLovin ad. You can clear most fields by setting their values to nil
. To clear the gender value, set it to ALGenderUnknown
. To clear the maximumAdContentRating value, set it to ALAdContentRatingNone
. Also, you can clear all fields with the following snippet:
-
[[ALSdk shared].targetingData clearAll];
-
ALSdk.shared()!.targetingData.clearAll()
Location Passing
Starting with SDK version 11.0.0, only if your application already has the relevant end-user permissions, the SDK will automatically collect from the device the latitude and longitude coordinates truncated to the hundredths decimal place.
The truncation occurs on the device, which means that the full coordinates do not leave the device.
The following code snippets show how you disable the SDK from automatically collecting location when your application has the relevant end-user permissions:
-
ALSdk *sdk = [ALSdk shared]; sdk.settings.locationCollectionEnabled = NO;
-
let sdk = ALSdk.shared()! sdk.settings.locationCollectionEnabled = false
Content URL Passing
AppLovin recommends that you pass your App content URL when you make ad requests. The App content URL is passed in the bid request for buy-side contextualization or review and may be required for spend from some DSP buyers.
The following code snippets show how you pass your App content URL when you make an ad request:
-
// Interstitial Ad self.interstitialAd = [[MAInterstitialAd alloc] initWithAdUnitIdentifier: @"ad_unit_id"]; [self.interstitialAd setExtraParameterForKey: @"content_url" value: @"value"]; // Rewarded Ad self.rewardedAd = [MARewardedAd sharedWithAdUnitIdentifier: @"ad_unit_id"]; [self.rewardedAd setExtraParameterForKey: @"content_url" value: @"value"]; // Banner Ad self.bannerAd = [[MAAdView alloc] initWithAdUnitIdentifier: @"ad_unit_id"]; [self.bannerAd setExtraParameterForKey: @"content_url" value: @"value"]; // MRec Ad self.mrecAd = [[MAAdView alloc] initWithAdUnitIdentifier: @"ad_unit_id" adFormat: MAAdFormat.mrec ]; [self.mrecAd setExtraParameterForKey: @"content_url" value: @"value"]; // Native Ad self.nativeAdLoader = [[MANativeAdLoader alloc] initWithAdUnitIdentifier: @"ad_unit_id"]; [self.nativeAdLoader setExtraParameterForKey: @"content_url" value: @"value"];
-
// Interstitial Ad let interstitialAd = MAInterstitialAd(adUnitIdentifier: "ad_unit_id") interstitialAd.setExtraParameterForKey("content_url", value: "value") // Rewarded Ad let rewardedAd = MARewardedAd.shared(withAdUnitIdentifier: "ad_unit_id") rewardedAd.setExtraParameterForKey("content_url", value: "value") // Banner Ad let bannerAd = MAAdView(adUnitIdentifier: "ad_unit_id") bannerAd.setExtraParameterForKey("content_url", value: "value") // MRec Ad let mrecAd = MAAdView(adUnitIdentifier: "ad_unit_id", adFormat: MAAdFormat.mrec) mrecAd.setExtraParameterForKey("content_url", value: "value") // Native Ad let nativeAdLoader = MANativeAdLoader(adUnitIdentifier: "ad_unit_id") nativeAdLoader.setExtraParameterForKey("content_url", value: "value")
Unified Identifiers
MAX Publishers can pass UID2 tokens as an additional data point for buyers to use for targeting and accurately bidding on app inventory. The tokens will then be included in the bid stream sent to programmatic buyers. Publishers must handle the tokenization and then pass the token to AppLovin. See the code examples below for how to pass the tokens:
-
// App Open Ad self.appOpenAd = [[MAAppOpenAd alloc] initWithAdUnitIdentifier: @"ad_unit_id"]; [self.appOpenAd setExtraParameterForKey: @"uid2_token" value: @"value"] // Banner Ad self.bannerAd = [[MAAdView alloc] initWithAdUnitIdentifier: @"ad_unit_id"]; [self.bannerAd setExtraParameterForKey: @"uid2_token" value: @"value"]; // Interstitial Ad self.interstitialAd = [[MAInterstitialAd alloc] initWithAdUnitIdentifier: @"ad_unit_id"]; [self.interstitialAd setExtraParameterForKey: @"uid2_token" value: @"value"]; // MRec Ad self.mrecAd = [[MAAdView alloc] initWithAdUnitIdentifier: @"ad_unit_id" adFormat: MAAdFormat.mrec ]; [self.mrecAd setExtraParameterForKey: @"uid2_token" value: @"value"]; // Native Ad self.nativeAdLoader = [[MANativeAdLoader alloc] initWithAdUnitIdentifier: @"ad_unit_id"]; [self.nativeAdLoader setExtraParameterForKey: @"uid2_token" value: @"value"]; // Rewarded Ad self.rewardedAd = [MARewardedAd sharedWithAdUnitIdentifier: @"ad_unit_id"]; [self.rewardedAd setExtraParameterForKey: @"uid2_token" value: @"value"];
-
// App Open Ad let appOpenAd = MAAppOpenAd(adUnitIdentifier: "ad_unit_id") appOpenAd.setExtraParameterForKey("uid2_token", value: "value") // Banner Ad let bannerAd = MAAdView(adUnitIdentifier: "ad_unit_id") bannerAd.setExtraParameterForKey("uid2_token", value: "value") // Interstitial Ad let interstitialAd = MAInterstitialAd(adUnitIdentifier: "ad_unit_id") interstitialAd.setExtraParameterForKey("uid2_token", value: "value") // MRec Ad let mrecAd = MAAdView(adUnitIdentifier: "ad_unit_id", adFormat: MAAdFormat.mrec) mrecAd.setExtraParameterForKey("uid2_token", value: "value") // Native Ad let nativeAdLoader = MANativeAdLoader(adUnitIdentifier: "ad_unit_id") nativeAdLoader.setExtraParameterForKey("uid2_token", value: "value") // Rewarded Ad let rewardedAd = MARewardedAd.shared(withAdUnitIdentifier: "ad_unit_id") rewardedAd.setExtraParameterForKey("uid2_token", value: "value")