Retrieves daily advertising campaign statistics.
| Method |
get.campaign_daily_stat |
| Description |
Retrieves daily advertising campaign statistics. |
| Who has access |
Agents and clients |
Request parameters
| Name |
Type |
Required |
Valid values |
Description |
access_token |
string |
yes |
|
API access key |
user_id |
number |
no |
|
User ID. Required when an administrator requests data on behalf of another user |
limit |
number |
no |
|
Number of records returned. See section "Paging" |
offset |
number |
no |
|
Shift determines from which record number to return "limit" records. Default is "0". See section "Paging" |
filter |
object |
no |
|
See the "Filters" section |
fields |
array |
no |
|
See the "Views" section |
sort |
array |
no |
|
See the "Sorting" section |
date_from |
iso8601 |
yes |
YYYY-MM-DD hh:mm:ss |
Start date and time of the reporting period. Maximum range: 90 days. |
date_till |
iso8601 |
yes |
YYYY-MM-DD hh:mm:ss |
Sampling end date |
site_id |
number |
yes |
|
Site ID in the CallGear system |
Response parameters
| Name |
Type |
Valid values |
Filtering |
Sorting |
Default response |
Description |
date |
iso8601 |
YYYY-MM-DD |
yes |
yes |
yes |
Day for which statistics are shown, ISO |
site_id |
number |
|
yes |
| yes |
Site ID in the CallGear system |
site_domain_name |
string |
|
yes |
|
yes |
Site domain name |
campaign_id |
number |
|
yes |
yes |
yes |
Advertising campaign ID in the CallGear system |
campaign_name |
string |
|
yes |
|
yes |
Advertising campaign name |
campaign_ext_id |
string |
|
yes |
yes |
yes |
External identifier of the advertising campaign |
campaign_ext_name |
string |
|
yes |
yes |
yes |
Name of external advertising campaign |
engine |
enum |
yandex.direct, google.adwords, vk.ads, mytarget.ads |
|
|
yes |
Advertising campaign system |
banner_group_id |
string |
|
|
yes |
yes |
Ad group ID in the advertising system |
banner_group_name |
string |
|
|
|
yes |
Name of the ad group in the advertising system |
keyword_id |
string |
|
|
yes |
yes |
Keyword ID in the advertising system |
keyword |
string |
|
|
|
yes |
Keyword |
cost_sum |
string |
|
|
|
yes |
Costs per channel on a given day in the currency of the advertising system |
shows_count |
number |
|
|
|
yes |
Impressions for the channel on a given day |
clicks_count |
number |
|
|
|
yes |
Number of clicks on an ad on a given day |
chats_count |
number |
|
|
|
|
Number of chats for an advertising campaign per day |
calls_count |
number |
|
|
|
|
Number of calls per advertising campaign per day |
goals_count |
number |
|
|
|
|
Number of advertising campaign goals per day |
offline_messages_count |
number |
|
|
|
|
Number of requests from the site for an advertising campaign per day |
current_banner_id |
string |
|
|
yes |
yes |
Current ad ID in the advertising system |
old_banner_ids |
array |
|
|
|
|
Previous ad identifiers in the advertising system |
visits_count |
number |
|
|
|
|
Number of visits on a given day |
communications_count |
number |
|
|
|
|
Number of communications on a given day |
favorites_count |
number |
|
|
|
|
Number of communications marked as favorites on a given day |
current_banner_name |
string |
|
|
|
yes |
Name of the current banner in the advertising system |
daily_budget |
number |
|
|
|
yes |
Daily budget |
weekly_budget |
number |
|
|
|
yes |
Weekly budget |
currency |
enum |
|
|
|
yes |
Currency |
session_ids |
array |
|
|
|
|
List of session ids from this account for the day |
source_id |
number |
|
Yes |
Yes |
No |
Source ID |
source_name |
string |
|
Yes |
Yes |
No |
Source name |
| List of requests |
communications |
array |
|
|
|
|
List of requests for this ad campaign for the day |
communication_type |
enum |
call, chat, offline_message, goal |
|
|
|
Communication type. |
communication_id |
number |
|
|
|
|
Unique communication ID |
attributes |
array |
|
|
|
|
Hit attributes |
| Tags |
tags |
array |
|
|
|
|
Tags associated with the communication. |
tag_id |
number |
|
|
|
|
Unique tag identifier |
tag_name |
string |
|
|
|
|
Tag name |
tag_type |
enum |
auto, manual |
|
|
|
Tag type |
tag_change_time |
iso8601 |
YYYY-MM-DD hh:mm:ss |
|
|
|
Date and time of tag insertion |
tag_user_id |
number |
|
|
|
|
Unique ID of the user who added the tag. |
tag_user_login |
string |
|
|
|
|
Login of the user who added the tag |
tag_employee_id |
number |
|
|
|
|
Unique ID of the employee who added the tag. |
tag_employee_full_name |
string |
|
|
|
|
Full name of the employee who added the tag. |
Example request
{
"id": "1",
"jsonrpc": "2.0",
"method": "get.campaign_daily_stat",
"params": {
"access_token": "string",
"user_id": "number",
"offset": "number",
"limit": "number",
"date_from": "iso8601",
"date_till": "iso8601",
"site_id": "number",
"filter": {},
"sort": [
{
"field": "string",
"order": "string"
}
],
"fields": [
"string"
]
}
}
JSON response structure
{
"id": "1",
"jsonrpc": "2.0",
"result": [
{
"date": "iso8601",
"site_id": "number",
"site_domain_name": "string",
"campaign_id": "number",
"campaign_name": "string",
"campaign_ext_id": "string",
"campaign_ext_name": "string",
"engine": "enum",
"banner_group_id": "string",
"banner_group_name": "string",
"keyword_id": "string",
"keyword": "string",
"current_banner_id": "string",
"current_banner_name": "string",
"old_banner_ids": [
"number"
],
"cost_sum": "string",
"shows_count": "number",
"clicks_count": "number",
"calls_count": "number",
"chats_count": "number",
"goals_count": "number",
"offline_messages_count": "number",
"source_id": "number",
"source_name": "string",
"session_ids": [
"number"
],
"daily_budget": "number",
"weekly_budget": "number",
"currency": "enum",
"visits_count": "number",
"communications_count": "number",
"favorites_count": "number",
"communications": [
{
"communication_type": "enum",
"communication_id": "number",
"attributes": [
"string"
],
"tags": [
{
"tag_id": "number",
"tag_name": "string",
"tag_type": "enum",
"tag_change_time": "iso8601",
"tag_user_id": "number",
"tag_user_login": "string",
"tag_employee_id": "number",
"tag_employee_full_name": "string"
}
]
}
]
}
]
}
Possible errors
See the "Errors for get methods" section.