Custom Parameters for Unity

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: 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 set several times per session.
  • To reset the value, use clearRewardedVideoServerParams, and then set the new value.
public void setRewardedVideoServerParams(Dictionary<string, string> parameters)
public void clearRewardedVideoServerParams()

Offerwall

Note: Note:
  • Custom Parameters should be called before calling showOfferwall.
Dictionary<string, string> owParams = new Dictionary<string, string>();
owParams.Add(“key1”, “value1");
owParams.Add(“key2”, “value2");
IronSourceConfig.Instance.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:

Dictionary<string, string> owParams = new Dictionary<string, string>();
owParams.Add("ip", "1.0.0.9");
IronSourceConfig.Instance.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