Analytics Allows to add a tab with Extension analytics data to the Event's analytics page. This feature is enabled by providing corresponding flag in instance handshake response.
Analytics
GET
https://example-extension.mic.io/lvis/:lvis_instance_id/projects/:project_id/events/:event_id/analytics_tab
Path Parameters
200
Copy {
"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
Copy curl --request GET \
--url https://example-extension.mic.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'
Copy {
"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: