Skip to content

Statistics

Get main metrics for a period

POST /project/statistics/get-daily

A method for obtaining main metrics for a period.

Limitation: 5 requests per hour.

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

Request Body:

{
    "period": "2016-06-01-2016-06-30",
    "time_zone": "Europe/Moscow",
    "channel": "direct4"
}
{
    "StatisticsItems": [
        {
            "dateStart": "2016-06-12 00:00:00",
            "dateEnd": "2016-06-12 23:59:59",
            "visitCount": 789,
            "leadCount": 9,
            "saleCount": 0,
            "revenue": 0,
            "profit": 0,
            "marketingCosts": 32816,
            "salesCosts": 0,
            "cv1": 1.1406844106464,
            "cv2": 0,
            "cpc": 41.592927756653999,
            "cpl": 3646.3133333332999,
            "cpo": 0,
            "averageRevenue": 0,
            "roi": -100
        },
        {
            "dateStart": "2016-06-13 00:00:00",
            "dateEnd": "2016-06-13 23:59:59",
            "visitCount": 858,
            "leadCount": 14,
            "saleCount": 1,
            "revenue": 13560,
            "profit": 11955,
            "marketingCosts": 34675,
            "salesCosts": 1605,
            "cv1": 1.6317016317016,
            "cv2": 7.1428571428570997,
            "cpc": 40.413916083916,
            "cpl": 2476.7957142856999,
            "cpo": 34675.139999999999,
            "averageRevenue": 13560,
            "roi": -65.522850087988004
        },
        {
            "dateStart": "2016-06-14 00:00:00",
            "dateEnd": "2016-06-14 23:59:59",
            "visitCount": 958,
            "leadCount": 12,
            "saleCount": 1,
            "revenue": 13860,
            "profit": 12255,
            "marketingCosts": 40713,
            "salesCosts": 1605,
            "cv1": 1.2526096033403,
            "cv2": 8.3333333333333002,
            "cpc": 42.498538622128997,
            "cpl": 3392.8000000000002,
            "cpo": 40713.599999999999,
            "averageRevenue": 13860,
            "roi": -69.899493044093006
        }
    ],
    "SummaryItem": {
        "dateStart": "2016-06-11 21:00:00",
        "dateEnd": "2016-06-14 20:59:59",
        "visitCount": 2605,
        "leadCount": 35,
        "saleCount": 2,
        "revenue": 27420,
        "profit": 24210,
        "marketingCosts": 108205,
        "salesCosts": 3210,
        "cv1": 1.3435700575816001,
        "cv2": 5.7142857142857002,
        "cpc": 41.537642994241999,
        "cpl": 3091.5874285713999,
        "cpo": 54102.779999999999,
        "averageRevenue": 13710,
        "roi": -77.625918668135
    },
    "AverageItem": {
        "dateStart": "2016-06-11 21:00:00",
        "dateEnd": "2016-06-14 20:59:59",
        "visitCount": 868.33333333332996,
        "leadCount": 11.666666666667,
        "saleCount": 0.66666666666666996,
        "revenue": 9140,
        "profit": 8070,
        "marketingCosts": 36068.519999999997,
        "salesCosts": 1070,
        "cv1": 1.3435700575816001,
        "cv2": 5.7142857142857002,
        "cpc": 41.537642994241999,
        "cpl": 3091.5874285713999,
        "cpo": 54102.779999999999,
        "averageRevenue": 13710,
        "roi": -77.625918668135
    },
    "status": "success"
}

Query String:

Parameter Type Description Required
project string Project number yes

Request Body:

Parameter Type Description Required
period string period of time in YYYY-MM-DD-YYYY-MM-DD format (UTC) yes
time_zone string Timezone no
channel string Channel's system name and its ID in Roistat (without any separating characters) no
Parameter Type Description
StatisticsItems array[object] Daily statistics
dateStart string Start date
dateEnd string End date
visitCount integer Number of visits
leadCount integer Number of leads
saleCount integer Number of sales (orders must be paid)
revenue integer Revenue
profit integer Profit (Revenue - all expenses)
marketingCosts integer Marketing costs
salesCosts integer First cost
cv1 integer or number Lead conversion rate
cv2 integer or number Sales conversion rate
cpc integer or number CPC - cost per click
cpl integer or number CPL - cost per lead
cpo integer or number CPO - cost per order
averageRevenue integer Average revenue
roi integer or number ROI - return on investments
SummaryItem object Total period statistics
dateStart string
dateEnd string
visitCount integer
leadCount integer
saleCount integer
revenue integer
profit integer
marketingCosts integer
salesCosts integer
cv1 integer or number
cv2 integer or number
cpc integer or number
cpl integer or number
cpo integer or number
averageRevenue integer
roi integer or number
AverageItem object Average statistics for the period
dateStart string
dateEnd string
visitCount number
leadCount number
saleCount number
revenue integer
profit integer
marketingCosts number
salesCosts integer
cv1 integer or number
cv2 integer or number
cpc integer or number
cpl integer or number
cpo integer or number
averageRevenue integer
roi integer or number
status string