AdsApp.SearchCampaignAudienceBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builder for
SearchCampaignAudience and
SearchCampaignExcludedAudience
objects.
Example usage:
var audienceBuilder = campaign.targeting().newUserListBuilder();
var audienceOperation = audienceBuilder
.withAudienceId(3) // required
.build(); // add the audience, or .exclude() to exclude
// the audience.
var audience = audienceOperation.getResult();
Methods:
build()
Builds the audience. Returns a
SearchCampaignAudienceOperation
that corresponds to the addition of the
SearchCampaignAudience.
Return values:
exclude()
Builds the excluded audience. Returns a
SearchCampaignExcludedAudienceOperation
that corresponds to the addition of the
SearchCampaignExcludedAudience.
Return values:
withAudience(userList)
Sets the user list of the audience.
Arguments:
Name | Type | Description |
userList |
AdsApp.UserList |
The user list of the audience. |
Return values:
withAudienceId(audienceId)
Sets the audience ID of the audience. This field is required. 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 audience ID of the audience. |
Return values:
withBidModifier(modifier)
Sets the bid modifier value for this audience to the specified value.
The bid modifier is a multiplier applied to the audience's bids, with an
acceptable range from 0.1
(a 90%
decrease) to
10.0
(a 900%
increase).
For more information about bid modifiers please see the Google Ads Help
Center article. Use of this method when adding an excluded audience is
not supported.
Arguments:
Name | Type | Description |
modifier |
double |
The bid modifier value. |
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 `SearchCampaignAudienceBuilder` enables the creation and management of audience targeting within Google Ads search campaigns."],["It facilitates adding or excluding user lists to campaigns for refined targeting."],["Audience targeting can be further customized using `withBidModifier` to adjust bids for specific audiences."],["Building an audience requires specifying the audience ID or the User List using either `withAudienceId` or `withAudience`."]]],[]]