Skip to content

Visits

Get data about all visits

POST /project/site/visit/list

The method used to get data about all visits.

Our standard filters can be applied to limit data to be loaded. To filter data by nested parameters, it is necessary to specify both a parent element and a child one separated by a dot. For instance, you should filter by visit source like this: [[ "source.system_name", "like", "yandex"]].

However, you cannot filter data by the following parameters: google_client_id, device, order_ids, source.icon_url, source.openstat, geo.country, geo.region, geo.city, icon_url, country_iso, cost.

Record volume limitation - 10 000 per answer.

Moreover, limit and offset are supported.

curl 'https://cloud.roistat.com/api/v1/project/site/visit/list?project=12345' \
    --request POST \
    --header 'Content-type: application/json' \ 
    --header 'Api-key: {KEY}' \ 
    --data Standard filters
{
    "data": {
        "id": "4336465",
        "first_id": "4336465",
        "date": "2016-06-19T00:30:31+0000",
        "landing_page": "paintingsdemo.ru/l/portrait",
        "host": "paintingsdemo.ru",
        "google_client_id": null,
        "ip": "11.111.111.111",
        "roistat_param1": null,
        "roistat_param2": null,
        "roistat_param3": null,
        "roistat_param4": null,
        "roistat_param5": null,
        "device": {
            "os": "OS X",
            "os_icon": "https://cloud.roistat.com/img/os/macosx.png",
            "agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36",
            "agent_icon": "https://cloud.roistat.com/img/browsers/chrome.png",
            "is_mobile": false
        },
        "source": {
            "referrer": "http://yandex.ru",
            "system_name": "direct1_search_1_123456_789012",
            "display_name": "Yandex.Direct_Search_Paintings_Promo",
            "display_name_by_level": [
                "Yandex.Direct",
                "Search",
                "Paintings",
                "Promo"
            ],
            "icon_url": "https://favicon.yandex.net/favicon/vk.com",
            "utm_source": null,
            "utm_medium": null,
            "utm_campaign": null,
            "utm_term": null,
            "utm_content": null,
            "openstat": null
        },
        "geo": {
            "country": "Russia",
            "region": "Smolensk region",
            "city": "Smolensk",
            "icon_url": "/img/country/ru.png",
            "country_iso": "RU"
        },
        "order_ids": [
            "62"
        ],
        "cost": 223.18299999999999,
        "ab_test": [
            {
                "test_id": 1,
                "test_title": "button",
                "variant_id": "1",
                "variant_title": "green"
            },
            {
                "test_id": 2,
                "test_title": "font",
                "variant_id": "1",
                "variant_title": "14px"
            }
        ]
    },
    "total": 1,
    "status": "success"
}

Query String:

Parameter Type Description Required
project string Project number yes

Request Body:

Standard filters.

Parameter Type Description
data object
id string Current visit ID
first_id string Client's first visit ID
date string Date and time of a visit
landing_page string Visited web page
host string Visited domain
google_client_id null or string Client ID assigned by the Google Analytics cookie
ip string Visitor's IP address
roistat_param1 null or string Value of the roistat_param1 tag in the visitor's URL
roistat_param2 null or string Value of the roistat_param2 tag in the visitor's URL
roistat_param3 null or string Value of the roistat_param3 tag in the visitor's URL
roistat_param4 null or string Value of the roistat_param4 tag in the visitor's URL
roistat_param5 null or string Value of the roistat_param5 tag in the visitor's URL
device object Visitor's device
>> os string Visitor's OS
>> os_icon string OS icon
>> agent string Visitor's browser
>> agent_icon string Browser icon
>> is_mobile boolean true - visit from a mobile device
source object
>> referrer string Referrer URL
>> system_name string Channel's system name in Roistat
>> display_name string A human-readable channel name in Roistat
>> display_name_by_level array[string] A human-readable channel name on each level
>> icon_url string Channel icon URL
>> utm_source null or string Value of the utm_source parameter in the visitor's URL
>> utm_medium null or string Value of the utm_medium parameter in the visitor's URL
>> utm_campaign null or string Value of the utm_campaign parameter in the visitor's URL
>> utm_term null or string Value of the utm_term parameter in the visitor's URL
>> utm_content null or string Value of the utm_content parameter in the visitor's URL
>> openstat null or string Value of the Openstat tag in the visitor's URL
geo object
>> country string Visitor's country
>> region string Visitor's region
>> city string Visitor's city
>> icon_url string Country flag icon URL
>> country_iso string Country code
order_ids array[string] Visitor orders IDs
cost number Order cost
ab_test array[object]
>> test_id number Test ID
>> test_title string Test name
>> variant_id string Variant ID
>> variant_title string Variant name
total integer
status string

Change roistat_param values assigned to a visit

POST /project/site/visit/params/update

This method allows you to change roistat_param values assigned to a visit.

curl 'https://cloud.roistat.com/api/v1/project/site/visit/params/update?project=12345' \
    --request POST \
    --header 'Content-type: application/json' \ 
    --header 'Api-key: {KEY}' \ 
    --data Request body - see below

Request Body:

{
    "visit": "123",
    "roistat_param1": "onlineshop"
}
{
    "status": "success"
}

Query String:

Parameter Type Description Required
project string Project number yes

Request Body:

Parameter Type Description Required
visit string yes
roistat_param1 string или null no
roistat_param2 string или null no
roistat_param3 string или null no
roistat_param4 string или null no
roistat_param5 string или null no
Parameter Type Description
status string