AdsApp.VideoAudienceBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builder for
VideoAudience objects.
For details about video audiences, please see
About targeting for
video campaigns.
Example usage:
var videoAudienceBuilder = videoAdGroup
.videoTargeting()
.newAudienceBuilder();
var videoAudienceOperation = videoAudienceBuilder
.withAudienceType('USER_INTEREST') // required
.withAudienceId(80432) // required
.build(); // create the audience
Methods:
build()
Builds the video audience. Returns a
VideoAudienceOperation that corresponds to the creation of the
VideoAudience.
Return values:
exclude()
Builds the excluded video audience. Returns an
ExcludedVideoAudienceOperation that corresponds to the creation of the
ExcludedVideoAudience.
Custom affinities cannot be excluded.
Return values:
withAudienceId(audienceId)
Sets the ID of the excluded audience. This field is required. For user
interests, affinity categories and corresponding IDs can be found on
API
documentation on affinity categories, and in-market categories and
corresponding IDs can be found on
API
documentation on in-market categories. User List IDs (List IDs) are
available on the details page of a User List (found under the Audiences
section of the Shared Library).
Arguments:
Name | Type | Description |
audienceId |
String |
The ID of the excluded audience. |
Return values:
withAudienceType(audienceType)
Sets the type of the audience. Possible values:
USER_INTEREST
,
USER_LIST
or
CUSTOM_AFFINITY
. This field is
required.
Arguments:
Name | Type | Description |
audienceType |
String |
The type of the excluded audience. |
Return values:
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 2025-01-28 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 2025-01-28 UTC."],[[["The VideoAudienceBuilder is used to create or exclude video audiences for targeting in video ad groups."],["It allows setting the audience type (like user interest, custom affinity, or user list) and the corresponding audience ID."],["`build()` creates a VideoAudience, while `exclude()` creates an ExcludedVideoAudience (excluding custom affinities is not supported)."],["Audience IDs for various categories can be found in the API documentation or the Shared Library for user lists."]]],[]]