Get visitor sessions report
Method |
get.visitor_sessions_report |
Description |
Getting information about visitors sessions |
Who has access |
Partner, Customer |
Parameters of a request
Title |
Type |
Required |
Valid value |
Description |
access_token |
string |
yes |
|
Authentication session key |
user_id |
number |
no |
|
Unique user ID of agent's customer who makes request Is required for agent To get a list of customer users, use the method "get.customer_users" |
limit |
number |
no |
|
Returning entries count. Refer to "Paging" |
offset |
number |
no |
|
Offset that defines from which number to return the entries "limit" . Default value is "0". Refer to "Paging" |
filter |
object |
no |
|
Refer to "Filters" |
fields |
array |
no |
|
Refer to "Viewing returning data" |
sort |
array |
no |
|
Refer to "Data sorting" |
date_from |
iso8601 |
yes |
YYYY-MM-DD hh:mm:ss |
Sampling start date |
date_till |
iso8601 |
yes |
YYYY-MM-DD hh:mm:ss |
Sampling end date |
Parameters of a reply
Title |
Type |
Valid value |
Filtering |
Sorting |
Default reply |
Description |
date_time |
iso8601 |
YYYY-MM-DD
hh:mm:ss |
|
|
|
Time and date of a session |
id
|
number |
|
|
|
|
Session unique ID |
ua_client_id
|
string |
|
|
|
|
Unique ID in Universal Analytics |
ym_client_id |
string |
|
|
|
|
Unique user ID in Yandex.Metrika |
gclid
|
string |
|
|
|
|
Tag value gclid |
yclid
|
string |
|
|
|
|
Tag value yclid |
ef_id
|
string |
|
|
|
|
Tag value ef_id |
ymclid
|
string |
|
|
|
|
Tag value ymclid |
cm_id
|
string |
|
yes |
|
|
cm_id - is the ValueTrack set . ValueTrack are URL parameters that can be added to landing pages URLs to collect click source information.
|
integrated_campaign_data
|
object |
|
yes |
|
|
Integrated campaign data
adv_system - Advertising system
ext_campaign_id - Advertising campaign ID in the advertising system
ext_campaign_name - Advertising campaign name in the advertising system
keyword_id - Phrase ID in the advertising system
keyword - Phrase name in the advertising system
current_banner_id - Current ad ID in the advertising system
old_banner_ids - Current ad IDs in the advertising system
banner_name - Ad name in the advertising system
group_id - Group ID in the advertising system
group_name - Group name in the advertising system
auditory_id - Auditory ID in the advertising system
auditory_name - Auditory name in the advertising system
placement_name - Placement name in the advertising system
yandex_placement_type - Placement type in the advertising system
campaign_type - Campaign type in the advertising system
device_type - Device type in the advertising system
position_type - Click position in the advertising system
yandex_region_id - Region ID in the advertising system
yandex_region_name - Region name
yandex_region_type - Region type
|
referrer_domain
|
string |
|
|
|
|
Referrer domain |
referrer
|
string |
|
|
|
|
Referrer source |
search_engine
|
string |
|
|
|
|
Search engine |
search_query
|
string |
|
|
|
|
Search query |
entrance_page
|
string |
|
|
|
|
Entrance page |
exit_page
|
|
|
|
|
|
Exit page |
duration
|
number |
|
|
|
|
Session duration.
Value is in seconds |
channel
|
enum |
display
paid
affiliate
messenger
social
email
organic
internal
recommendation
cashed
referral
direct
|
|
|
|
Channel. |
engine
|
enum |
yandex.metrika
yandex.direct
google.analytics
google.adwords
|
|
|
|
Advertising engine
pcc.engine_mnemonic
|
Advertising campaign
|
campaign_id |
number |
|
yes |
yes |
yes |
Advertising campaign unique ID |
campaign_name |
string |
|
yes |
yes |
|
Advertising campaign name |
Website |
site_id |
number |
|
yes |
yes |
yes |
Website unique ID |
site_domain_name |
string |
|
yes |
yes |
|
Website address on the internet. Without protocol - "http://" or "https://" |
Information about visitors |
person_id |
number |
|
yes |
|
yes |
Person unique ID |
visitor_id |
number |
|
yes |
yes |
yes |
Visitor unique ID |
visitor_device |
enum |
desktop
mobile
tablet
other
|
yes |
yes |
yes |
User device |
visitor_country |
string |
|
yes |
yes |
|
Visitor country |
visitor_city |
string |
|
yes |
yes |
|
Visitor city |
visitor_region |
string |
|
yes |
yes |
|
Visitor region |
visitor_ip_address |
string |
|
|
|
|
Visitor IP-address |
visitor_type |
enum |
New,
Returned |
yes |
yes |
|
Visitor type |
visitor_browser_name |
string |
|
yes |
yes |
|
Visitor browser |
visitor_browser_version |
string |
|
yes |
yes |
|
Visitor browser version |
visitor_os_name |
string |
|
yes |
yes |
|
Visitor operating system name |
visitor_os_version |
string |
|
|
|
|
Visitor operating system version |
visitor_provider |
string |
|
|
|
|
Visitor internet provider |
visitor_screen |
string |
|
yes |
yes |
|
Visitor screen resolution |
visitor_language |
string |
|
yes |
yes |
|
Visitor device localization |
Visitor properties |
visitor_custom_properties |
array |
|
yes |
|
|
Visitor properties that can be set in the client area or using JavaScript API [method CallGear.setProperty(name, value); ]
|
property_name |
string |
|
|
|
|
Name of a property that's to be assigned to a visitor |
property_value |
string |
|
|
|
|
Property value |
UTM tags |
utm_source |
string |
|
yes |
|
|
UTM-source |
utm_medium |
string |
|
yes |
|
|
UTM-medium |
utm_term |
string |
|
yes |
|
|
UTM-term |
utm_content |
string |
|
yes |
|
|
UTM-content |
utm_campaign |
string |
|
yes |
|
|
UTM-campaign |
Openstat-tags |
openstat_ad |
string |
|
yes |
|
|
Ad ID |
openstat_campaign |
string |
|
yes |
|
|
Advertising campaign ID |
openstat_service |
string |
|
yes |
|
|
Service provider ID |
openstat_source |
string |
|
yes |
|
|
ID of a site, a section, a page, or a place on the page where an ad was shown |
List of visited pages |
hits_count |
number |
|
|
|
|
Visited pages count |
hits |
array |
|
|
|
|
List of visited pages |
hit_time |
string |
|
|
|
|
Transition to page time |
hit_duration |
string |
|
|
|
|
Page visit duration.
Format "HH:MM:SS" |
hit_url |
string |
|
|
|
|
Page address |
Segments list |
segments |
array |
|
yes |
|
|
Segments |
segment_name |
string |
|
|
|
|
Segment name |
segment_id |
number |
|
|
|
|
Segment unique ID |
List of communications |
communications |
array |
|
yes |
|
|
Communication type, refer to the method "get.communications_report"
|
communication_type |
enum |
chat , call , goal , offline_message |
|
|
|
Type of communication. To get detailed information on each type of communication you can use the following methods: "get.communications_report" , "get.chats_report" , "get.goals_report" , "get.offline_messages_report" , "get.calls_report"
|
communication_id |
number |
|
|
|
|
Unique ID of a communication. With this ID, you can get detailed information using the following methods: "get.communications_report" , "get.chats_report " , "get.goals_report " , "get.offline_messages_report " , "get.calls_report"
|
communication_date_time |
iso8601 |
YYYY-MM-DD hh:mm:ss |
|
|
|
Time and date of communication |
JSON request structure
{
"jsonrpc":"2.0",
"id":"number",
"method":"get.visitor_sessions_report",
"params":{
"access_token":"string",
"user_id":"number",
"offset":"number",
"limit":"number",
"date_from":"iso8601",
"date_till":"iso8601",
"filter":{
},
"sort":[
{
"field":"string",
"order":"string"
}
],
"fields":[
"string"
]
}
}
JSON reply structure
{
"jsonrpc": "2.0",
"id": "number",
"result": {
"metadata": {
},
"data": [
{
"id": "number",
"date_time": "iso8601",
"gclid": "string",
"ua_client_id": "string",
"ym_client_id": "string",
"yclid": "string",
"ef_id": "string",
"ymclid": "string",
"engine": "enum",
"integrated_campaign_data": {
"adv_system": "enum",
"ext_campaign_id": "string",
"ext_campaign_name": "string",
"keyword_id": "string",
"keyword": "string",
"banner_id": "number",
"banner_name": "string",
"group_id": "number",
"group_name": "string",
"auditory_id": "number",
"auditory_name": "string",
"placement_name": "string",
"yandex_placement_type": "string",
"campaign_type": "string",
"device_type": "string",
"position_type": "string",
"yandex_region_id": "number",
"yandex_region_name": "string",
"yandex_region_type": "string"
},
"cm_id": "string",
"referrer_domain": "string",
"referrer": "string",
"search_engine": "string",
"search_query": "string",
"entrance_page": "string",
"duration": "string",
"site_id": "number",
"site_domain_name": "string",
"camapign_id": "number",
"campaign_name": "string",
"channel": "enum",
"visitor_device": "enum",
"visitor_id": "number",
"visitor_country": "string",
"visitor_city": "string",
"visitor_region": "string",
"visitor_ip_address": "string",
"visitor_type": "enum",
"visitor_browser_name": "string",
"visitor_browser_version": "string",
"visitor_os_name": "string",
"visitor_os_version": "string",
"visitor_provider": "string",
"visitor_screen": "string",
"visitor_language": "string",
"visitor_custom_properties": [
{
"property_name": "string",
"property_value": "string"
}
],
"utm_source": "string",
"utm_medium": "string",
"utm_term": "string",
"utm_content": "string",
"utm_campaign": "string",
"openstat_ad": "string",
"openstat_campaign": "string",
"openstat_service": "string",
"openstat_source": "string",
"hits_count": "number",
"hist": {
"hit_time": "string",
"hit_duration": "string",
"hit_url": "string"
},
"segments": [
{
"segment_name": "string",
"segment_id": "number"
}
],
"communications": [
{
"communication_type": "enum",
"communication_id": "number",
"communication_date_time": "iso8601"
}
]
}
]
}
}
List of returning errors
Refer to the section "List of errors for the methods with the verb get"