Represents a Google Ads negative keyword.
Negative keywords can exist either at the ad group level or the campaign level.
Methods:
getAdGroup()
Returns the
AdGroup to which the negative keyword belongs. This will always return
null
for campaign-level negative keywords.
Return values:
getBaseAdGroup()
Returns the base
AdGroup to which the negative keyword belongs. This will always return
null
for campaign-level negative keywords.
Return values:
getBaseCampaign()
Returns the base
Campaign to which the negative keyword belongs.
Return values:
getCampaign()
Returns the
Campaign to which the negative keyword belongs.
Return values:
getEntityType()
Returns the type of this entity as a
String
, in this case,
"NegativeKeyword"
.
Return values:
Type | Description |
String |
Type of this entity: "NegativeKeyword" . |
getMatchType()
Returns the match type of the negative keyword. Possible values:
BROAD, PHRASE, EXACT
.
Return values:
Type | Description |
String |
The match type of the negative keyword. |
getText()
Returns the text of the negative keyword. The returned value will be formatted as follows,
depending on the match type:
shoes
- broad match
"shoes"
- phrase match
[leather shoes]
- exact match
Return values:
Type | Description |
String |
The text of the negative keyword. |
remove()
Removes the negative keyword.
Returns nothing.