title | description | author | ms.author | ms.service | ms.topic |
---|---|---|---|---|---|
Campaign object |
Contains the methods used to manage the campaign. |
jonmeyers |
jonmeyers |
bing-ads-scripts |
article |
Contains the methods used to manage a campaign.
Method Name | Return Type | Description |
---|---|---|
addLocation(int locationId) | TargetedLocationOperation | Creates a location target in this campaign from a location ID. |
addLocation(int locationId, double bidModifier) | TargetedLocationOperation | Creates a location target in this campaign from a location ID and bid modifier. |
addNegativeKeywordList(NegativeKeywordList negativeKeywordList) | void | Adds a negative keyword list to this campaign. |
adgroups | AdGroupSelector | Gets a selector used to filter the list of ad groups in this campaign. |
ads | AdSelector | Gets a selector used to filter the list of ads in this campaign. |
applyLabel(string name) | void | Applies the label to this campaign. |
enable | void | Enables this campaign. |
excludeLocation(int locationId) | ExcludedLocationOperation | Creates a location exclusion in this campaign from a location ID. |
getBiddingStrategyType | string | Gets this campaign's bidding strategy. |
getBudget | Budget | Gets this campaign's budget. |
getEntityType | string | Gets this entity's type. |
getId | string | Gets the ID that uniquely identifies this campaign. |
getName | string | Gets this campaign's name. |
getStats | Stats | Gets this campaign's performance data. |
isEnabled | boolean | Gets a Boolean value that indicates whether this campaign is enabled. |
isPaused | Boolean | Gets a Boolean value that indicates whether this campaign is paused. |
isRemoved | Boolean | Gets a Boolean value that indicates whether this campaign is removed (deleted). |
keywords | KeywordSelector | Gets a selector used to filter the list of keywords in this campaign. |
labels | LabelSelector | Gets a selector used to filter the list of labels associated with this campaign. |
newAdGroupBuilder | AdGroupBuilder | Gets a builder used to add an ad group to this campaign. |
pause | void | Pauses this campaign. |
productGroups | ProductGroupSelector | Gets a selector used to filter the list of product groups in this campaign. |
remove | void | Removes this campaign. |
removeLabel(string name) | void | Removes the label from this campaign. |
setName(String name) | void | Sets this campaign's name. |
targeting | CampaignTargeting | Provides access to campaign level targeting criteria: location targeting. |
urls | CampaignUrls | Gets the methods for managing this campaign's tracking template and custom parameters. |
Creates a location target in this campaign from a location ID.
Type | Description |
---|---|
TargetedLocationOperation | The operation object used to check whether the targeted location was successfully added. |
Creates a location target in this campaign from a location ID and bid modifier.
Type | Description |
---|---|
TargetedLocationOperation | The operation object used to check whether the targeted location was successfully added. |
Adds a negative keyword list to this campaign.
Name | Type | Description |
---|---|---|
negativeKeywordList | NegativeKeywordList | The negative keyword list to add to this campaign. A campaign may contain a maximum of 20 lists. |
Type | Description |
---|---|
void | Returns nothing. |
Gets a selector used to filter the list of ad groups in this campaign.
Type | Description |
---|---|
AdGroupSelector | A selector used to filter the list of ad groups in this campaign. |
Gets a selector used to filter the list of ads in this campaign.
Type | Description |
---|---|
AdSelector | A selector used to filter the list of ads in this campaign. |
Applies the label to the campaign.
You may apply a maximum of 50 labels to a campaign. For an example that adds a label to an entity, see Using labels.
Name | Type | Description |
---|---|---|
name | string | The label's case-sensitive name. To get a list of labels in this account that you can apply, see AdsApp.labels. |
Type | Description |
---|---|
void | Returns nothing. |
Enables this campaign.
Type | Description |
---|---|
void | Returns nothing. |
Creates a location exclusion in this campaign from a location ID.
Type | Description |
---|---|
ExcludedLocationOperation | The operation object used to check whether the excluded location was successfully added. |
Gets this campaign's bidding strategy.
Type | Description |
---|---|
string | The campaign's bidding strategy. Possible values are:
|
Gets this campaign's budget.
Type | Description |
---|---|
Budget | Contains the methods for managing this campaign's budget. |
Gets this entity's type.
Type | Description |
---|---|
string | This entity's type, which is Campaign. |
Gets the ID that uniquely identifies this campaign.
Type | Description |
---|---|
string | The ID that uniquely identifies this campaign. |
Gets this campaign's name.
Type | Description |
---|---|
string | The campaign's name. |
Gets this campaign's performance data.
To call this method, you must include one of the forDateRange
methods in the campaign selector's chain.
Type | Description |
---|---|
Stats | The campaign's performance data. |
Gets a Boolean value that indicates whether this campaign is enabled.
Type | Description |
---|---|
boolean | Is true if this campaign is enabled; otherwise, false. |
Gets a Boolean value that indicates whether this campaign is paused.
Type | Description |
---|---|
Boolean | Is true if this campaign is paused; otherwise, false. |
Gets a Boolean value that indicates whether this campaign is removed (deleted).
Type | Description |
---|---|
Boolean | Is true if this campaign is removed; otherwise, false. |
Gets a selector used to filter the list of keywords in this campaign.
Type | Description |
---|---|
KeywordSelector | A selector used to filter the list of keywords in this campaign. |
Gets a selector used to filter the list of labels associated with this campaign.
Type | Description |
---|---|
LabelSelector | A selector used to filter the list of labels associated with this campaign. |
Gets a builder used to add an ad group to this campaign.
Type | Description |
---|---|
AdGroupBuilder | The builder used to add an ad group to this campaign. |
Pauses this campaign.
Type | Description |
---|---|
void | Returns nothing. |
Gets a selector used to filter the list of product groups in this campaign.
Type | Description |
---|---|
ProductGroupSelector | A selector used to filter the list of product groups in this campaign. |
Removes this campaign.
Type | Description |
---|---|
void | Returns nothing. |
Removes the label from the campaign.
Name | Type | Description |
---|---|---|
name | string | The label's case-sensitive name. To get a list of labels associated with this campaign, see labels. |
Type | Description |
---|---|
void | Returns nothing. |
Sets the campaign's name.
Name | Type | Description |
---|---|---|
name | string | The campaign's name. The name may contain a maximum of 128 characters and must be unique within the account. |
Type | Description |
---|---|
void | Returns nothing. |
Provides access to campaign level targeting criteria: location targeting.
Type | Description |
---|---|
CampaignTargeting | Access to location targeting criteria in this campaign. |
Gets the methods for managing this campaign's tracking template and custom parameters.
Type | Description |
---|---|
CampaignUrls | Contains the methods for managing this campaign's tracking template and custom parameters. |