In Microsoft adCenter, negative keywords can be used to prevent an advertisement from being displayed if one or more of these negative keywords are present. For example, if you have an ad group with a keyword of "dog tricks" and a negative keyword of "old," a search for "young dog tricks" would cause a match. However, a search for "old dog tricks" would prevent a match because of the negative keyword.
Negative keywords can be applied at the campaign, ad group, or individual keyword level. Set the negative keywords for a campaign with the Campaign.NegativeKeywords element. Set the negative keywords for an ad group with the AdGroup.NegativeKeywords element. Set the negative keywords for a keyword with the Keyword.NegativeKeywords element. All these properties are an array of strings; each element in the array is a string, and each of these strings is a negative keyword. The total character count for all negative keywords cannot exceed 1,022; no single negative keyword can exceed 100 characters.
Negative keywords are not cumulative. If an entity has any negative keywords, the negative keywords for the higher level entity are not used. The negative keywords are examined in the following order:
-
Keyword
-
Ad Group
-
Campaign
For example, if a keyword has one or more negative keywords, any negative keywords for the ad group and campaign entities are ignored. Similarly, if a keyword has no negative keywords but the ad group that the keyword belongs to does have negative keywords, the negative keywords from the ad group are used and any negative keywords for the campaign are ignored.
Negative keywords for a campaign apply to the preferred language of the account. Negative keywords for an ad group or a keyword apply to the language of the ad group. There is no way to apply campaign negative keywords to another language.
When setting negative keywords for a keyword, the keyword must have at least one broad match bid or phrase match bid. You cannot set a negative keyword on a keyword that only has an exact match bid.
When the negative keywords for an entity are updated, any existing negative keywords are overwritten with the new values. To modify the negative keywords for a keyword, pass a Keyword object along with the new set of negative keywords in the Keyword.NegativeKeywords element to the UpdateKeywords service operation. The negative keywords for an ad group and a campaign are similarly updated by using the UpdateAdGroups and UpdateCampaigns service operations, respectively.
To remove the negative keywords from an existing entity, pass an empty array for the NegativeKeywords element to the appropriate update service operation. For example, to remove the negative keywords from a keyword, pass a Keyword object with an empty array in the Keyword.NegativeKeywords element to the UpdateKeywords service operation.
Note: |
|---|
|
An empty array is not the same as a null array. If you pass a null array to the update service operation, the existing negative keywords are not modified.
|
The following C# code example shows how to set the Keyword.NegativeKeywords element to an empty array. The code for setting the Campaign.NegativeKeywords and AdGroup.NegativeKeywords elements to an empty array is virtually identical.
Keyword keyword = new Keyword();
keyword.NegativeKeywords = new string[0];
Concepts
Add Keywords
Managing Ads and Keywords