AdsApp.NegativeKeywordList
Represents a negative keyword list.
Methods:
addNegativeKeyword(keywordText)
Adds a
SharedNegativeKeyword to a
negative keyword list. Match type for the new shared negative keyword is
specified as follows:
negativeKeywordList.addNegativeKeyword("shoes")
- broad
match.
negativeKeywordList.addNegativeKeyword("\"shoes\"")
-
phrase match.
negativeKeywordList.addNegativeKeyword("[leather
shoes]")
- exact match.
Returns nothing.
Arguments:
Name | Type | Description |
keywordText |
String |
The text of the keyword. |
addNegativeKeywords(keywordTexts)
Adds a list of
SharedNegativeKeyword objects
to a negative keyword list. Match type for the new shared negative keywords
are specified as follows:
negativeKeywordsList.addNegativeKeywords(["planes",
"trains"])
- broad match.
negativeKeywordsList.addNegativeKeywords(["\"planes\"",
"\"trains\""])
- phrase match.
negativeKeywordsList.addNegativeKeywords(["[model planes]",
"[toy trains]")
- exact match.
Returns nothing.
Arguments:
Name | Type | Description |
keywordTexts |
String[] |
An array of keyword texts. |
campaigns()
Returns a selector of all campaigns this negative keyword list has been
applied to.
Return values:
Type | Description |
AdsApp.CampaignSelector |
A selector of all campaigns this negative keyword list has been
applied to. |
getEntityType()
Returns the type of this entity as a
String
, in this case,
"NegativeKeywordList"
.
Return values:
Type | Description |
String |
Type of this entity: "NegativeKeywordList" . |
getId()
Returns the ID of the negative keyword list.
Return values:
Type | Description |
String |
The ID of the negative keyword list. |
getName()
Returns the name of a negative keyword list.
Return values:
Type | Description |
String |
The name of a negative keyword list. |
getResourceName()
Returns the resource name of the negative keyword list.
Return values:
Type | Description |
String |
The resource name of the negative keyword list. |
negativeKeywords()
Returns a selector of the shared negative keywords in a negative keyword
list.
Return values:
setName(name)
Sets the name of a negative keyword list.
Returns nothing.
Arguments:
Name | Type | Description |
name |
String |
The new name of the negative keyword list. |
Returns a selector of all shopping campaigns this negative keyword list has
been applied to.
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.
[null,null,["Last updated 2025-01-28 UTC."],[[["Represents a negative keyword list, allowing you to exclude unwanted search terms from your campaigns."],["Provides methods to manage negative keywords, such as adding, viewing, and modifying them within the list."],["Enables application of the negative keyword list to specific campaigns or shopping campaigns for targeted exclusion."],["Offers functionalities to retrieve information about the negative keyword list, including its ID, name, and associated campaigns."],["Supports different match types (broad, phrase, exact) for precise control over negative keyword matching."]]],[]]