Analytics

Allows to add a tab with Service analytics data to the Event's analytics page. This feature is enabled by providing corresponding flag in instance handshake response.

get
Analytics

https://example-service.lvis.io/lvis/:lvis_instance_id/projects/:project_id/events/:event_id/analytics_tab
Request
Response
Request
Path Parameters
lvis_instance_id
required
string
Unique identifier across all LViS instances, in UUID format.
project_id
required
string
Project UUID.
event_id
required
string
Event UUID.
Response
200: OK
{
"id": "demographics-audience",
"name": "Audience",
"final": false,
"categories": [
{
"name": "Age breakdown",
"items": [
{
"type": "string",
"label": "Age < 18",
"value": "30%"
},
{
"type": "string",
"label": "Age 19 - 55",
"value": "50%"
},
{
"type": "string",
"label": "Age > 56",
"value": "20%"
}
]
},
{
"name": "Gender breakdown",
"items": [
{
"type": "string",
"label": "Male",
"value": "63%"
},
{
"type": "string",
"label": "Female",
"value": "37%"
}
]
}
]
}

Example

cURL
Response
cURL
curl --request GET \
--url https://example-service.lvis.io/lvis/c068dd33-46c3-4789-a619-b14e4bcbe990/projects/da34516f-00af-435e-bd03-ab1720755dda/events/a8552581-a10f-4fa7-85e9-7c9c82766be7/analytics_tab \
--header 'Content-Type: application/vnd.api+json'
Response
{
"id": "demographics-audience",
"name": "Audience",
"final": false,
"categories": [
{
"name": "Age breakdown",
"items": [
{
"type": "string",
"label": "Age < 18",
"value": "30%"
},
{
"type": "string",
"label": "Age 19 - 55",
"value": "50%"
},
{
"type": "string",
"label": "Age > 56",
"value": "20%"
}
]
},
{
"name": "Gender breakdown",
"items": [
{
"type": "string",
"label": "Male",
"value": "63%"
},
{
"type": "string",
"label": "Female",
"value": "37%"
}
]
}
]
}

Response parameters

categories define data sections and items define actual data. type defines how the data should be presented. Supported types are:

categories

Data sections.

items

Actual analytics data. type defines how the data should be presented and the only type currently supported is string, which will display data as is.

final

Informs that tab content will not change anymore and can be cached by LViS to be available anytime later without hitting the Service.