Custom Parameters for iOS

The ironSource SDK supports the ability for you to pass Custom Parameters upon the initialization of your chosen Ad Units and to receive this data upon the user’s completion event.

Note:

  1. Custom parameters work only in conjunction with server-to-server completion callbacks. You will receive the parameter as part of the Callback string.
  2. You may insert more than one custom parameter to the Init request. 

Implementation Example

If you’d like to receive the IP of the user as an additional parameter in the Completion callback for users who engaged with the Offerwall Ad Unit, you should use:

NSMutableDictionary * owDic = [[NSMutableDictionary alloc] init];
owDic[@"ip"] = @"1.0.0.9";
[ISConfigurations configurations].offerwallCustomParameters = owDic;

You will receive a corresponding callback exemplified below:

http://www.mydomain.com/rewardsCallback?appUserId=[USER_ID]&rewards=[REWARDS]&eventId=[EVENT_ID]&itemName=[ITEM_NAME]&custom_ip=1.0.0.9

Implementation Code

Rewarded Video

Note:

  • Custom Parameters can be added once per session for Rewarded Video.
  • Custom Parameters should be called before initiating the Rewarded Video.
NSMutableDictionary * rvDic = [[NSMutableDictionary alloc] init];
rvDic[@"ip"] = @"1.0.0.9";
[ISConfigurations configurations].rewardedVideoCustomParameters = rvDic;

 

Offerwall

Note:

  • Custom Parameters should be called before calling showOW.
NSMutableDictionary * owDic = [[NSMutableDictionary alloc] init];
owDic[@"ip"] = @"1.0.0.9";
[ISConfigurations configurations].offerwallCustomParameters = owDic;