Wiki

Clone wiki

AATKit iOS / AATKit / AATKit_Keyword_Targeting

Keyword Targeting

Index:

  1. Project Setup
  2. AATKit Initialisation
  3. Banner Integration
  4. Fullscreen Integration
  5. Rewarded Video
  6. APP Open Integration
  7. Native Ads Integration
  8. Native Ads Integration - special ad network characteristics
  9. Disable App Transport Security (ATS)
  10. Advanced Features
  11. Targeting
  12. Frequency Capping
  13. Important Remarks
  14. AATKit's Size within your app
  15. What is an AdSpace?
  16. Network-specific Information
  17. Statistics Delegate
  18. Reports Delegate
  19. Listen to impression level information
  20. 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

static func setTargetingInfo(info: [String: [String]])
Enables usage of keywords for all placements created in your application.

Example:

Objective-C:

#!objective-c
[AATSDK setTargetingInfoWithInfo:@{@"interests": @[@"sports", @"stocks"], @"gender": @[@"female"]}];
Swift:
#!swift
AATSDK.setTargetingInfo(info: ["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
[self.fullscreenPlacement setTargetingInfo:@{@"interests": @[@"sports", @"stocks"], @"gender": @"female"}];
Swift:
#!swift
placement.targetingInfo = ["interests": ["sports", "stocks"], "gender": ["female"]]

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:

static func addAdNetworkForKeywordTargeting(network: AATAdNetwork)

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 AATAdNetwork.

Example:

Objective-C:

#!objective-c
[AATSDK addAdNetworkForKeywordTargetingWithNetwork:AATAdNetworkADMOB];
Swift:
#!swift
AATSDK.addAdNetworkForKeywordTargeting(network: .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.

static func removeAdNetworkForKeywordTargeting(network: AATAdNetwork)

Example:

Objective-C:

#!objective-c
[AATSDK removeAdNetworkForKeywordTargetingWithNetwork:AATAdNetworkADMOB];
Swift:
#!swift
AATSDK.removeAdNetworkForKeywordTargeting(network: .ADMOB)

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.

static func setContentTargetingUrl(targetingUrl: String)

Example:

Objective-C:

#!objective-c
[AATSDK setContentTargetingUrlWithTargetingUrl:@"http://www.addapptr.com"];  
Swift:
#!swift
AATSDK.setContentTargetingUrl(targetingUrl: "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.

Example:

Objective-C:

#!objective-c
[self.placement setContentTargetingUrl: @"http://www.addapptr.com"];
Swift:
#!swift
placement.contentTargetingUrl = "http://www.addapptr.com"

back (Advanced Features)

next (Frequency Capping)

Updated