Custom Parameters When Showing an Ad

Custom parameters are user-defined data—such as demographics, ad category, or campaign details—which track ad completions. If your rewarding strategy is Server Side Rewarding, you can add these parameters with Interstitial or Rewarded ad completions to improve tracking and reporting accuracy in User Level Reports.

Defining Custom Parameters

To define and implement custom parameters, use the following API:

Java
public class ShowOptions {
    public void setCustomParameters(
        Map<String, String> customParameters) {}
}
public void show(
    @NonNull String placementId,
    final ShowOptions showOptions,
    final Activity activity) {}

Interstitial Ads

To set custom parameters in Interstitial ads, use the following API:

Java
Map<String, String> customParams = customParams();
ShowOptions showOptions = new ShowOptions();
showOptions.setCustomParameters(customParams);
Interstitial.show(placementId, showOptions, activity);

Rewarded Ads

To set custom parameters in Rewarded ads, use the following API:

Last updated