Content mapping

Stay organized with collections Save and categorize content based on your preferences.

Prerequisites

  • Google Mobile Ads SDK 19.0.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 AdRequest.Builder.setContentUrl() method:

Java

AdRequest requestWithContent = new AdRequest.Builder()
    .setContentUrl("https://www.example.com")
    .build();

Kotlin

var requestWithContent = AdRequest.Builder()
    .setContentUrl("https://www.example.com")
    .build()

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 AdRequest.Builder.setNeighboringContentUrls() method:

Java

ArrayList<String> urls = new ArrayList<String>();
urls.add("https://www.mycontenturl1.com");
urls.add("https://www.mycontenturl2.com");
urls.add("https://www.mycontenturl3.com");
urls.add("https://www.mycontenturl4.com");
AdRequest requestWithContent = new AdRequest.Builder()
    .setNeighboringContentUrls(urls)
    .build();

Kotlin

var urls = mutableListOf("https://www.mycontenturl1.com",
    "https://www.mycontenturl2.com",
    "https://www.mycontenturl3.com",
    "https://www.mycontenturl4.com")
var requestWithContent = AdRequest.Builder()
    .setNeighboringContentUrls(urls)
    .build()