-
Notifications
You must be signed in to change notification settings - Fork 8
Adding Custom Values
Publisher id is set globally using the main AdformSDK class and setPublisherId:andCustomData: method. Custom data is an optional parameter and you can pass nil to this method. However, if you want to target your users more accurately you should use the "custom data" parameter. It is a NSDictionary object containing key-value pairs (e.g. {"gender":"male"}) and is set globally to all ad requests. This parameter should be set before loading any ads because after a successful request to the server (with this parameter) "custom data" cannot be modified (you can still set it if you haven't done it before loading the ads). The best place to set the "custom data" parameter is application:didFinishLaunchingWithOptions: application delegate method. The example code below shows you how to set the "custom data" parameter:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
//Create custom data parameter dictionary, we are using literal definition for this, but you can use any other definition as well
let customData = ["gender": "male", "age": "20"]
//Set AdformSDK custom data parameter
AdformSDK.setPublisherId(PublisherId, andCustomData: customData)
return true
}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
- Native Ads
- OpenRTB Taxonomy parameters and Multibid