Campaign
The object contains information about an ad campaign, parameters for impressions, and abbreviated statistics.
Alert
Versions 4 and Live 4 of the Yandex Direct API only support campaigns with the “Text & Image Ads” type. To work with all types of campaigns, use the Campaigns service in version 5 of the API. More information about campaign types.
A campaign has an identifier, CampaignID
. It is returned when creating a campaign using the CreateOrUpdateCampaign method, and is used for getting parameters in the GetCampaignsParams method.
The following structure shows the minimal set of campaign parameters.
Следующая структура показывает минимальный состав параметров кампании.
params = {
"CampaignID": (int),
"Login": (string),
"Name": (string),
"FIO": (string),
"Strategy":{
"StrategyName": (string)
},
"EmailNotification":{
"Email": (string),
"SendWarn": (string),
"WarnPlaceInterval": (int),
"MoneyWarningValue": (int),
"SendAccNews": (string)
},
}
There are additional parameters provided for campaigns, which are described below. A full list of parameters is given in the response for the GetCampaignsParams
method. You can also get the main campaign parameters using the methods GetCampaignsList and GetCampaignsListFilter.
General data
The Name
, FIO
and Login
parameters contain the campaign name and information about its owner, and the StartDate parameter contains the campaign start date.
The ManagerName
and AgencyName
parameters are filled in automatically after a campaign is created.
Campaign statistics
The Rest
and Sum
parameters contain financial indicators for the campaign (they are also returned by the GetBalance method). The SumAvailableForTransfer
parameter specifies the amount available for transferring.
The Shows
and Clicks
parameters contain abbreviated campaign statistics.
Status and state
The Status
parameter describes the current state of the campaign in human-readable format.
The StatusModerate
parameter shows the result of moderation. A campaign is considered as having passed moderation if the moderator approved at least one of the ads. After passing moderation, funds can be transferred to the campaign balance and an invoice can be generated (see Financial transactions).
The StatusShow
parameter contains the status for displaying ads, which can be switched. The IsActive parameter indicates the actual state for impressions, and changes automatically. In addition, the beginning of impressions is indicated by the StatusActivating
parameter.
An inactive campaign can be moved to the archive. This changes the value of the StatusArchive
parameter. It may take up to several minutes to archive large campaigns that have many ads and keywords. During this time, the parameter has the “Pending” value.
Targeting
Targeting defines conditions for showing ads. The configuration of these conditions involves campaigns, ads, and keywords, and is described in the section Targeting.
Strategies for managing bids
Ads are selected for impressions based on an auction. When setting up ads, the advertisers make bids. An ad is displayed if the bid is higher than competing bids and also higher than the minimum price set by Yandex Direct.
You can make bids manually for keywords, or use automatic bid management strategies.
Setting a daily budget
The daily budget can only be set up for campaigns with manual display strategies.
The optional DayBudget
structure contains the Amount
and SpendMode
parameters.
To reset the daily budget, set the Amount
parameter to 0. The daily budget is also reset when the strategy is changed to an automatic strategy.
Notifications
The mandatory structure EmailNotification
contains the parameters Email
, SendWarn
, WarnPlaceInterval
, MoneyWarningValue
, and SendAccNews
.
The optional structure SmsNotification
contains the parameters MetricaSms
, ModerateResultSms
, MoneyInSms
, MoneyOutSms
, SmsTimeFrom
, and SmsTimeTo
.
If the advertiser has the shared account enabled, the parameters MoneyInSMS
, MoneyOutSMS
, and MoneyWarningValue
are parameters of the shared account, not the campaign.
Others
Use the StatusOpenStat
parameter to turn on a feature that adds a tag in OpenStat format to links to the advertiser's website.