Wiki

Clone wiki

AATKit iOS / AATKit_Keyword_Targeting

Keyword Targeting

Index:

  1. Project Setup
  2. AATKit Initialisation
  3. Banner Integration
  4. Fullscreen Integration
  5. APP Open Integration
  6. Native Ads Integration
  7. Native Ads Integration - special ad network characteristics
  8. Promo Screen
  9. Sample
  10. Disable App Transport Security (ATS)
  11. Advanced Features
  12. Targeting
  13. Rewarded Video
  14. Frequency Capping
  15. Header documentation
  16. Important Remarks
  17. AATKit's Size within your app
  18. What is an AdSpace?
  19. Network-specific Information
  20. Statistics Delegate
  21. Reports Delegate
  22. Listen to impression level information
  23. AATKit AdMob custom events adapter (>= 2.77.x)

General Information

Some networks support adding additional information to improve the ads for the current app context. Keywords can be defined as a dictionary like this: @{@"interests": @[@"sports", @"stocks"], @"gender": @"female"}.

Important remark: If you are using the new request/response based banner API or the banner cache, then all targeting settings have to be configured for the used ad request object, as described here. The global or placement specific settings described below will not be applied there.

Supported types of the keys: NSString.

Supported types for the values: NSString, NSNumber, and NSArray containing NSString and/or NSNumber. Please contact the support team for help when defining targeting information.

In case you want to use keyword targeting, you have to insert them into the AATKit by calling one or both of the following methods:

Set global Keywords

#!objective-c
+ (void)setTargetingInfo:(nullable NSDictionary*)targetingInfo;
Enables usage of keywords for all placements created in your application.

Example:

Objective-C:

#!objective-c
[AATKit setTargetingInfo:@{@"interests": @[@"sports", @"stocks"], @"gender": @"female"}];
Swift:
#!swift
AATKit.setTargetingInfo(["interests": ["sports", "stocks"],
                         "gender": "female"])

Set Placement specific Keywords

#!objective-c
+ (void) setTargetingInfo:(nonnull NSDictionary*)targetingInfo forPlacement:(nonnull NSObject<AATKitPlacement>*)placement;
Enables usage of keywords for a specific placement in your application.

Example:

Objective-C:

#!objective-c
[AATKit setTargetingInfo:@{@"interests": @[@"sports", @"stocks"], @"gender": @"female"} forPlacement:yourPlacement];
Swift:
#!swift
AATKit.setTargetingInfo(["interests": ["sports", "stocks"], "gender": "female"],
                        for: <YourPlacement>)

The specified keywords are used for all networks by default. If you want to restrict keyword usage to only specific networks, you need to continue reading.

Limit Ad Network specific Keywords

If you want to restrict keyword usage to specific ad networks, you have to use the following methods:

#!objective-c
+ (void)addAdNetworkForKeywordTargeting:(enum AATKitAdNetwork)adNetwork;

Enables previously set keywords for a specific ad network only. When setting global and placement specific keywords, the latter will take precedence.

Currently, only a subset of ad networks available in the AATKit is supported:

  • AdMob
  • DFP
  • MoPub
  • Smaato
  • SmartAdServer

Ad networks are specified using a value of the enumeration AATKitAdNetwork.

Example:

Objective-C:

#!objective-c
[AATKit addAdNetworkForKeywordTargeting:AATDFP];
Swift:
#!swift
AATKit.addAdNetwork(forKeywordTargeting: .AATDFP)

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.

#!objective-c
+ (void)removeAdNetworkForKeywordTargeting:(enum AATKitAdNetwork)adNetwork;

Example:

Objective-C:

#!objective-c
[AATKit removeAdNetworkForKeywordTargeting:AATDFP];
Swift:
#!swift
AATKit.removeAdNetwork(forKeywordTargeting: .AATDFP)

Content Targeting URL

By now only ad requests for networks with the GADRequest class support adding a content URL to the request. So this affects ad requests for:

  • AdMob
  • AdX
  • DFP
  • Bluestack

(As mentioned at the top of this page, the new banner API and banner cache require a different approach to configure the content targeting URL.)

Set the content targeting URL for all following ad requests, unless you have set a content targeting URL for a specific placement before.

#!objective-c
+ (void)setContentTargetingURL:(nullable NSString*)targetingURL;

Example:

Objective-C:

#!objective-c
[AATKit setContentTargetingURL:@"http://www.addapptr.com"];  
Swift:
#!swift
AATKit.setContentTargetingURL("http://www.addapptr.com")

Set the content targeting URL for a specific placement for all following ad request. General setting of the content targeting URL will be overwritten for this placement.

#!objective-c
+ (void)setContentTargetingURL:(nullable NSString*)targetingURL forPlacement:(nonnull NSObject<AATKitPlacement>*)placement;
Example:

Objective-C:

#!objective-c
[AATKit setContentTargetingURL:@"http://www.addapptr.com" forPlacement:<YourPlacement>];
Swift:
#!swift
AATKit.setContentTargetingURL("http://www.addapptr.com", for: <YourPlacement>)

back (Advanced Features)

next (Frequency Capping)

Updated