Send feedback
Content mapping
Stay organized with collections
Save and categorize content based on your preferences.
Prerequisites
Google Mobile Ads SDK 19.5.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
AdManagerAdRequest.Builder.setContentUrl()
method:
Java
AdManagerAdRequest requestWithContent = new AdManagerAdRequest. Builder ()
. setContentUrl ( "https : //www.example.com")
. build ();
Kotlin
var requestWithContent = AdManagerAdRequest. Builder ()
. setContentUrl ( "https : //www.example.com")
. build ()
Multi-content URL
If your content is represented by more than one URL, for example a feed app, you
can request ads next to content represented by up to four URLs by using the
AdManagerAdRequest.Builder.setNeighboringContentUrls()
method:
Java
ArrayList<String> urls = new ArrayList<String> ();
urls . add ( "https : //www.example1.com");
urls . add ( "https : //www.example2.com");
urls . add ( "https : //www.example3.com");
urls . add ( "https : //www.example4.com");
AdManagerAdRequest requestWithContent = new AdManagerAdRequest. Builder ()
. setNeighboringContentUrls ( urls )
. build ();
Kotlin
var urls = mutableListOf ( "https : //www.example1.com", "https://www.example2.com",
"https : //www.example3.com", "https://www.example4.com")
var requestWithContent = AdManagerAdRequest. Builder ()
. setNeighboringContentUrls ( urls )
. build ()
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-03-13 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-03-13 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-03-13 UTC."]]