AdsApp.DisplayKeywordBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builder for
DisplayKeyword objects.
Example usage:
var displayKeywordBuilder = adGroup.display().newKeywordBuilder();
var displayKeyword = displayKeywordBuilder
.withText("keyword text") // required
.withCpc(0.50) // optional
.build() // create the display keyword
Methods:
build()
Builds the display keyword. Returns a
DisplayKeywordOperation that
corresponds to the creation of the
DisplayKeyword.
Return values:
exclude()
Builds the excluded display keyword. Returns an
ExcludedDisplayKeywordOperation
that corresponds to the creation of the
ExcludedDisplayKeyword.
Return values:
withCpc(cpc)
Sets the max CPC bid of the new display keyword to the specified value.
Arguments:
Name | Type | Description |
cpc |
double |
The max CPC bid of the display keyword. |
Return values:
withCpm(cpm)
Sets the CPM bid of the new display keyword to the specified value.
See Cost-per-thousand
impressions (CPM) for more information.
Arguments:
Name | Type | Description |
cpm |
double |
The CPM bid of the display keyword. |
Return values:
withText(text)
Sets the text of the display keyword. This field is required.
Arguments:
Name | Type | Description |
text |
String |
The display keyword text. |
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 DisplayKeywordBuilder facilitates the creation and management of display keywords within Google Ads scripts."],["It offers methods like `withText`, `withCpc`, and `withCpm` to define keyword attributes, with `withText` being mandatory."],["The `build()` method finalizes the display keyword creation, while `exclude()` specifically builds excluded display keywords."],["Both `build()` and `exclude()` return corresponding operation objects for the respective keyword types, such as `DisplayKeywordOperation` and `ExcludedDisplayKeywordOperation`."]]],[]]