Skip to end of metadata
Go to start of metadata

Pass Custom Keywords

Custom keywords are used to attach arbitrary key-value pairs to the request body of the ad call. These can be used for several purposes, including:

  • Custom campaign targeting options (see Key-Value Targeting  in the UI documentation for more information - UI login required)

  • Reporting (see Key Value Analytics Report in the UI documentation for more information - UI login required)

On This Page

Android

The following line of code adds a single key-value pair to the JSON body of the ad call:

For a more robust/complex setup, you can pass multiple values for the same key in the ad call. To do this, call addCustomKeywords multiple times with the same key:

iOS

The following line of code adds a single key-value pair to the JSON body of ad the call:

For a more robust/complex setup, you can pass multiple values for the same key in the ad call. To do this, call addCustomKeywordWithKey:(NSString *)key value:(NString *)value multiple times with the same key:

Related Topics