-
Notifications
You must be signed in to change notification settings - Fork 8
Adding key value pairs
Vladas Drejeris edited this page Jun 4, 2021
·
5 revisions
To add key-value pairs which will be used for targeting purposes please use the example below:
Swift
adView.keyValues = [AFKeyValue(key: "gender", value: "male"), AFKeyValue(key: "age", value: "20-30")]
Objective-C
adView.keyValues = @[AFKeyValue(@"gender", @"male"), AFKeyValue(@"age", @"20")];
If you were previously setting a dictionary to the "keyValues" property (SDK versions older than 2.7.2), you can use a convenience function to transform dictionary to key values array automatically:
Swift
adView.keyValues = AFKeyValuesFromNSDictionary(["gender": "male", "age": "20"])
Objective-C
adView.keyValues = AFKeyValuesFromNSDictionary(@{@"gender": @"male", @"age": @"20"});
Important, both key and value have a 200 character limit.
Basic integrations
- Integrating Inline Ad
- Integrating Full Screen Overlay Ad
- Integrating AdHesion Ad
- Integrating Interstitial Ad
- Video Ad Integration
- Debug mode
- Troubleshooting
Advanced integrations
- Advanced Inline Ad Integration
- Integrating Inline Ads in UITableView
- Advanced Full Screen Overlay Ad Integration
- Advanced Interstitial Ad Integration
- Instream Video Ads
Other
- Adding Custom Values
- Adding Keywords
- Adding Key Value Pairs
- Adding Search Words
- Location Tracking
- Security
- Ad Tags
- Header Bidding
- Changing ADX Domain
- Specifying banner loading behaviour
- Customizing in app browser
- GDPR
- US Privacy
- Localization
- In app deeplinks
Mediation adapters