Skip to content

Adding Search Words

Vladas Drejeris edited this page Jun 4, 2021 · 3 revisions

Adding search words to ad views

Search word targeting functionality allows publishers to pass search words to Adform PPAS via placement tags and target them within Line Items. In order to pass search words to PPAS following configuration needs to be added to the placement:

Swift

adView.searchWords = [AFKeyValue(key: "category", value: "books"), AFKeyValue(key: "product", value: "the book")]
Objective-C
adView.searchWords = @[AFKeyValue(@"category": @"books"), AFKeyValue(@"product": @"the book")];

or you can use a helper function to convert an NSDictionary with key values to search words like this:

Swift

let searchWords = ["category": "books", "product": "the book"]
adView.searchWords = AFKeyValuesFromNSDictionary(searchWords)
Objective-C
NSDictionary *searchWords = @{@"category": @"books", @"product": @"the book"};
adView.searchWords = AFKeyValuesFromNSDictionary(searchWords);
Clone this wiki locally