Key-Value Targeting
Provide key-value targeting information to ad requests
General Information
Some networks support adding additional information to improve the ads for the current app context. Keywords can be passed to AATKit in the form of Map<String, List<String>>
Map<String, List<String>> targeting = new HashMap<>();
targeting.put("interests", Arrays.asList("sports", "stocks"));
targeting.put("gender", Collections.singletonList("female"));
Please contact the support team for help when defining targeting information.
Set Global Targeting Keywords
To set the keyword targeting globally for all placements, you have to pass them to AATKit by calling the following method:
setTargetingInfo(info: Map<String, List<String>>?)
Usage
AATKit.setTargetingInfo(targeting);
Set Placement specific Keywords
Enables usage of keywords for specific placement in your application. The general setting of the targeting info will be overwritten for this placement.
Usage
placement.setTargetingInfo(targeting);
Limit Ad Network specific Keywords
If you want to restrict keyword usage to specific ad networks, you have to use the following methods:
addAdNetworkForKeywordTargeting(network: AdNetwork)
Enables previously set keywords for a specific ad network only. When setting global and placement-specific keywords, the latter will take precedence.
Ad networks are specified using a value of the enumeration AdNetwork
.
Usage
AATKit.addAdNetworkForKeywordTargeting(AdNetwork.ADMOB);
You can also remove ad networks that were targeted before. The collection of ad network enumeration is a white list only. This means you cannot add networks to be excluded from keyword targeting.
removeAdNetworkForKeywordTargeting(network: AdNetwork)
Usage
AATKit.removeAdNetworkForKeywordTargeting(AdNetwork.ADMOB);
Last updated