Content mapping

Prerequisites

  • Google Mobile Ads SDK 7.67.0 or higher

Content URL

Publishers who use content mapping to better monetize their app can pass a content URL for contextual targeting as well as brand safety.

For example, if you'd like to request ads next to content represented by https://www.example.com, you can pass the URL using the contentURL property on GADRequest:

Swift

let request = GADRequest()
request.contentURL = "https://www.example.com"

Objective-C

GADRequest *request = [GADRequest request];
request.contentURL = @"https://www.example.com";

Multi content URL

Publishers who use content mapping to better monetize their app can pass up to 4 content URLs to improve the brand safety of their content (which leads to more advertiser eligibility and increased monetization).

For example, if you'd like to request ads next to content represented by 4 URLs, you can pass the URLs using the neighboringContentURLStrings property on GADRequest:

Swift

let request = GADRequest()
request.neighboringContentURLStrings =
    ["https://www.example1.com", "https://www.example2.com",
    "https://www.example3.com", "https://www.example4.com"]

Objective-C

GADRequest *request = [GADRequest request];
request.neighboringContentURLStrings =
    @[@"https://www.example1.com", @"https://www.example2.com",
    @"https://www.example3.com", @"https://www.example4.com"];