Traffic report
GET
/api/v1/analytics/traffic
const url = 'https://digize.com/api/v1/analytics/traffic?days=30';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://digize.com/api/v1/analytics/traffic?days=30' \ --header 'x-api-key: <x-api-key>'Visitors, visits, page views, bounces and requests per day over twice the period (to compare it with the one before), with sources, devices, cities, top pages and why bots were turned away, across every site.
Needs the analytics:read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Done
Media typeapplication/json
object
tracking
required
string
days
required
Twice the period, oldest first, on the workspace’s clock.
Array<object>
object
date
required
string format: date-time
visitors
required
number
sessions
required
number
pageViews
required
number
bounces
required
number
requests
required
number
botsBlocked
required
number
sources
required
Array<object>
object
label
required
string
value
required
number
share
required
Its part of the breakdown, from 0 to 1.
number
devices
required
Array<object>
object
label
required
string
value
required
number
share
required
Its part of the breakdown, from 0 to 1.
number
cities
required
Array<object>
object
label
required
string
value
required
number
share
required
Its part of the breakdown, from 0 to 1.
number
pages
required
Array<object>
object
host
required
string
path
required
string
title
required
string
views
required
number
share
required
number
bounceRate
required
number | null
seconds
required
number | null
botReasons
required
Array<object>
object
label
required
string
value
required
number
share
required
Its part of the breakdown, from 0 to 1.
number
Example
{ "unavailable": { "reason": "token" }, "tracking": "full", "period": 7}What was sent isn’t valid (invalid).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}