AI-generated Key Takeaways
-
The SearchAdGroupAudienceBuilder is used to build SearchAdGroupAudience objects.
-
You can build an audience or an excluded audience using this builder.
-
Key methods include setting the audience ID, the user list, and the bid modifier.
-
The audience ID is a required field when building an audience.
-
Setting a bid modifier is not supported when building an excluded audience.
Example usage:
var audienceBuilder = adGroup.targeting().newUserListBuilder(); var audienceOperation = audienceBuilder .withAudienceId(3) // required .withBidModifier(1) // optional .build(); // add the audience var audience = audienceOperation.getResult();
Methods:
| Member | Type | Description |
|---|---|---|
| build() | AdsApp.SearchAdGroupAudienceOperation |
Builds the audience. |
| exclude() | AdsApp.SearchAdGroupExcludedAudienceOperation |
Builds the excluded audience. |
| withAudience(userList) | AdsApp.SearchAdGroupAudienceBuilder |
Sets the user list of the audience. |
| withAudienceId(audienceId) | AdsApp.SearchAdGroupAudienceBuilder |
Sets the audience ID of the audience. |
| withBidModifier(modifier) | AdsApp.SearchAdGroupAudienceBuilder |
Sets the bid modifier value for this audience to the specified value. |
build()
Builds the audience. Returns a SearchAdGroupAudienceOperation
that corresponds to the addition of the SearchAdGroupAudience. Return values:
| Type | Description |
|---|---|
AdsApp.SearchAdGroupAudienceOperation |
The SearchAdGroupAudienceOperation. |
exclude()
Builds the excluded audience. Returns an SearchAdGroupExcludedAudienceOperation
that corresponds to the addition of the SearchAdGroupExcludedAudience.
Use of this method while also setting a bid modifier is not supported.
Return values:
| Type | Description |
|---|---|
AdsApp.SearchAdGroupExcludedAudienceOperation |
The SearchAdGroupExcludedAudienceOperation. |
withAudience(userList)
Sets the user list of the audience. Arguments:
| Name | Type | Description |
|---|---|---|
| userList | AdsApp.UserList |
The user list of the audience. |
Return values:
| Type | Description |
|---|---|
AdsApp.SearchAdGroupAudienceBuilder |
An audience builder with the specified user list. |
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:
| Type | Description |
|---|---|
AdsApp.SearchAdGroupAudienceBuilder |
An audience builder for the specified audience ID. |
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:
| Type | Description |
|---|---|
AdsApp.SearchAdGroupAudienceBuilder |
An audience builder configured to use the specified bid modifier. |