CampaignService
CampaignService provides operations for accessing, modifying, and creating
AdWords Campaigns.
For more information about how to use the CampaignService, see the overview section.
Requests
Parameters
| Parameter name | Parameter type | Parameter description |
| campaign |
Campaign |
The information for the new campaign.
Required Campaign fields:
- budgetAmount - The budget amount (in micros)
- budgetPeriod - The period over which to spend budget
Optional Campaign fields:
- name - The human-readable name for this campaign. If omitted,
a name of the form "Campaign #2" will be used. All AdWords Campaigns
associated with this customer must have unique names.
- status - The status for this campaign. The status field may be
'Active' or 'Paused'. If omitted, the status 'Active' will be used.
- startDay - Starting with v6, if specified, the start
day must be today or later. A campaign with a start day in the future
has not started yet. Ignored in versions v5 and earlier.
- endDay - The end date for this campaign. If omitted, a date
far in the future will be used. If specified, this date must be
in the future. End dates will be rounded to midnight on the specified
day.
- networkTargeting - The syndication networks to target with this
campaign. If omitted, this campaign will run on both the search network
and content network.
- languageTargeting - A list of languages to target with this
campaign. A campaign that targets no specific languages will
run on all languages. The default value is all languages.
- geoTargeting - A list of geographical entities to target. The
default value is no specific targeting options (the campaign
will be seen by users from all locations).
Ignored fields:
- id - CampaignService sets the campaign ID upon creation.
|
Response
| Response type | Response description |
Campaign |
The new Campaign object, with the ID set. |
Creates multiple new campaigns.
Parameters
| Parameter name | Parameter type | Parameter description |
| campaigns |
Campaign[] |
The information for the new campaigns. See
addCampaign for information on setting fields on new Campaign
objects. |
Response
| Response type | Response description |
Campaign[] |
The new Campaign objects, with IDs set, in the same
order as the input data.
If any of the new campaigns are invalid, none will be added. |
Returns all information about all campaigns belonging to the customer
issuing the request. Ad Automator campaigns will not be included
in the list of returned campaigns.
Parameters
| Parameter name | Parameter type | Parameter description |
| dummy |
int |
Ignored. This parameter is present because some SOAP
toolkits have a hard time calling a function with headers but no
parameters. |
Response
| Response type | Response description |
Campaign[] |
A list of Campaign objects |
Returns all information about a specified campaign.
Parameters
| Parameter name | Parameter type | Parameter description |
| id |
int |
The ID of the campaign, which must already exist. |
Response
| Response type | Response description |
Campaign |
A Campaign object |
Returns all information about multiple campaigns.
Parameters
| Parameter name | Parameter type | Parameter description |
| ids |
int[] |
The list of campaign IDs to retrieve |
Response
| Response type | Response description |
Campaign[] |
A list of Campaign objects, in the same order as the
input list.
If any IDs are invalid, an exception will be thrown. |
Returns statistics for a list of campaigns. See StatsRecord for
details about the statistics returned. The time granularity is one day,
and is always with respect to the account's local timezone.
Parameters
| Parameter name | Parameter type | Parameter description |
| campaignIds |
int[] |
The campaigns to query for statistics |
| startDay |
date |
The starting day of the period for which statistics are
to be collected (xsd:date). |
| endDay |
date |
The ending day of the period for which statistics are to be
collected, inclusive (xsd:date). |
Response
| Response type | Response description |
StatsRecord[] |
an array of
StatsRecord
containing information about the activity on the campaign.
The order of StatsRecord objects returned may be different from
the order in which the id's were requested. |
Checks if the specified campaigns are eligible to use conversion
optimizer. To be eligible, a campaign must satisfy the following
criteria:
- All ad groups within the campaign must be CPC-based and
keyword-targeted.
- Budget optimizer is not enabled
- Must have
conversion tracking enabled with at least 200 conversions in the
past 30 days.
For more information, see
What is the Conversion Optimizer? in the AdWords Help Center.
Parameters
| Parameter name | Parameter type | Parameter description |
| campaignIds |
int[] |
The list of campaigns to check. |
Response
Retrieves the 'optimized ad serving' setting for this campaign.
If optimized ad serving is enabled for a campaign, ads with
the best clickthrough rates will be favored. This setting applies
to all ad groups in the campaign.
More information is available at
tips.
Parameters
| Parameter name | Parameter type | Parameter description |
| campaignId |
int |
Get the optimization setting for this campaign |
Response
| Response type | Response description |
boolean |
True if optimization is enabled, false otherwise. |
Modifies the 'optimized ad serving' setting for this campaign.
New campaigns have optimized ad serving enabled by default.
This setting can only be toggled for campaigns that have at least
one ad associated with them.
Parameters
| Parameter name | Parameter type | Parameter description |
| campaignId |
int |
Modify the optimization setting for this campaign |
| enable |
boolean |
If true, optimization will be turned on; if false,
optimization will be turned off. |
Response
| Response type | Response description |
(none) |
|
Updates the settings for an existing campaign.
Parameters
| Parameter name | Parameter type | Parameter description |
| campaign |
Campaign |
The new campaign settings. campaign.id defines
which campaign to modify. A campaign with this ID must already exist.
The requirements for the individual fields are described in
addCampaign. All fields are mutable except for id and
startDate. If any field is absent, it will not be modified. |
Response
| Response type | Response description |
(none) |
|
Updates the settings for multiple existing campaigns.
Parameters
| Parameter name | Parameter type | Parameter description |
| campaigns |
Campaign[] |
|
Response
| Response type | Response description |
(none) |
|