Wiki
Clone wikiAATKit iOS / AATKit / AATKit_Keyword_Targeting
Keyword Targeting
Index:
- Project Setup
- AATKit Initialisation
- Banner Integration
- Fullscreen Integration
- Rewarded Video
- APP Open Integration
- Native Ads Integration
- Native Ads Integration - special ad network characteristics
- Disable App Transport Security (ATS)
- Advanced Features
- Targeting
- Frequency Capping
- Important Remarks
- AATKit's Size within your app
- What is an AdSpace?
- Network-specific Information
- Statistics Delegate
- Reports Delegate
- Listen to impression level information
- 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]])
Example:
Objective-C:
#!objective-c [AATSDK setTargetingInfoWithInfo:@{@"interests": @[@"sports", @"stocks"], @"gender": @[@"female"]}];
#!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;
Example:
Objective-C:
#!objective-c [self.fullscreenPlacement setTargetingInfo:@{@"interests": @[@"sports", @"stocks"], @"gender": @"female"}];
#!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 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 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 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 placement.contentTargetingUrl = "http://www.addapptr.com"
back (Advanced Features)
next (Frequency Capping)
Updated