The VMaxAdSDK class provides global settings through which you can enable various features.
Targeting:
1. Passing Custom Data to all ad requests
1 2 3 4 |
#import "VMaxAdSDK.h" NSDictionary *dict = @{ key : value, key2 : value2}; [VMaxAdSDK setCustomData:dict]; |
1 2 3 |
var dict = [key: value, key2: value2] VMaxAdSDK.customData = dict |
Note: If invalid data is passed in any of the above parameters the SDK would ignore the data.
Note:
1. The above api would apply on all VMaxAdView objects used in the project
2. To pass custom data at adView level(on VMaxAdView object) you can refer Ad view Settings
3.In the case where key’s of the dict passed to [adView setCustomData:dict] and [VMaxAdSDK setCustomData:dict]; conflict, then the dict passed to [adView setCustomData:dict] would be given priority.
2. Targeting for specifics
The VMAX SDK allows you to pass extra data to identify users for serving targeted campaign ads. For example, if your app users sign in using an email address, you can send this information to the server and create a campaign to target only specific user email addresses with ads.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[VMaxAdSDK setUserCity:"<User_City>"] [VMaxAdSDK setUserEmail:"<User_Email>"] [VMaxAdSDK setLoginId:"<Login_ID>"] //possible values //AGE_18to24,AGE_25to34,AGE_35to44,AGE_45to54,AGE_55to64,AGE_ABOVE65 [VMaxAdSDK setUserAge:"<VMAXUserAge>"]; //possible values // GENDER_MALE,GENDER_FEMALE [VMaxAdSDK setUserGender:"<User_Gender>"]; // To set whether user did InApp Purchase [VMaxAdSDK setUserDidIAP:"<ID>"] // To set whether user did Incent offers [VMaxAdSDK setUserDidIncent:""] |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
VMaxAdSDK.userCity = "<User_City>" VMaxAdSDK.userEmail = "<User_Email>" VMaxAdSDK.loginId = "<LoginID>" //possible values //AGE_18to24,AGE_25to34,AGE_35to44,AGE_45to54,AGE_55to64,AGE_ABOVE65 VMaxAdSDK.userAge = "<VMAXuserAge>" //possible values // GENDER_MALE,GENDER_FEMALE VMaxAdSDK.userGender = "<UserGender>" // To set whether user did InApp Purchase VMaxAdSDK.userDidIAP = "<DipIPA>" // To set whether user did Incent offers VMaxAdSDK.userDidIncent = "<>" |
Note: If invalid data is passed in any of the above parameters the SDK would ignore the data.