User Data
Our SDK provides user data tranfer for better ad targeting and higher eCPM. All parameters are optional.
Set User Id
To assign an ID to a user, please call this method before Appodeal initialization:
- Swift
- Objective-C
Appodeal.setUserId("userId")
[Appodeal setUserId:@"userId"];
For data privacy and GDPR-compliance reasons, you may NOT use email address, phone number, real name or any other personally identifiable information in the user ID you set with this call.
Custom Segment Matching
If the logic of your application allows specifying user's characteristics, then you can pass specific parameters to the Appodeal SDK. You can use Segments in the future.
- For gender use kAppodealUserGenderKey.
- For age use kAppodealUserAgeKey.
- Swift
- Objective-C
Appodeal.setCustomStateValue("SOME_VALUE", forKey: "SOME_KEY")
[Appodeal setCustomStateValue:@"SOME_VALUE" forKey:@"SOME_KEY"];
Set Location Tracking
- Swift
- Objective-C
Appodeal.setLocationTracking(true)
[Appodeal setLocationTracking:YES];
Should be called before the SDK initialization.
The SDK will check the location permission on the user's device. If this permission is missing, the user will get an alert message with a request for location tracking.
Update User Consent Information
If you are using Stack Consent Manager all changes will be synchronise automatically.
If your application design allows the user to change given consent during the application runtime, you can update consent information in Appodeal using this method:
- Swift
- Objective-C
Appodeal.updateConsent(true)
[Appodeal updateConsent: YES];
Send Extra Data
You can send key-value data to Appodeal.
- Swift
- Objective-C
Appodeal.setExtrasValue("SOME_VALUE", forKey: "SOME_KEY")
[Appodeal setExtrasValue:@"SOME_VALUE" forKey:@"SOME_KEY"];
To send the device identifier from a mobile attribution service and match it with the Appodeal user id, use "attribution_id" as a key and a unique identifier from your attribution service as a value and if you use this method for attribution, call it before Appodeal SDK initialization.