Page Summary
-
Publishers can pass a content URL for contextual targeting and brand safety using the Google Mobile Ads SDK 7.67.0 or higher.
-
A single content URL can be passed using
contentUrl. -
Up to four URLs can be passed for multi-content using
neighboringContentURLStrings.
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 contentUrl
:
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
If your content is represented by more than one URL, for example a feed app, you
can request ads next to the content with up to four URLs by using neighboringContentURLStrings
:
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"
]
;

