Custom Parameters for Android

The ironSource SDK supports custom parameters for Rewarded Video and Offerwall. You can pass custom parameters upon the initialization of the ad unit and receive the parameters upon a user’s completion event.
New! You can now pass custom parameters for all mediation networks on the ironSource mediation platform.

Note:

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

Implementation Code

Rewarded Video

note] Note:

  • Custom Parameters can be added once per session for Rewarded Video.
  • Custom Parameters should be called before initiating the Rewarded Video.
[/note]
public static void setRewardedVideoServerParameters(Map<String, String> params)
public static void clearRewardedVideoServerParameters()

Offerwall

Note:

  • Custom Parameters should be called before calling showOfferwall.
Map<String, String> owParams = new HashMap<String,String>();
owParams.put("ip", "123.4.56.78");
ISConfig.getConfigObj().setOfferwallCustomParams(owParams);

Implementation Example

For example, if you’d like to receive the IP of a user who engaged with the Offerwall, you can add this as an additional parameter in the completion callback:

Map<String, String> owParams = new HashMap<String,String>();
owParams.put("ip", "123.4.56.78");
ISConfig.getConfigObj().setOfferwallCustomParams(owParams);

You will then receive a corresponding callback as exemplified below:

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