Viewer Analytics
This endpoint retrieves viewer analytics data.
- Type: objectdate
_range requiredThe timeframe to get the data for. Currently, we only support a maximum of 60 days between
start_atandend_at. - Type: array string[]metricsrequired
Get data for one or more
metricsin the same request. Please add any of these metrics.views,unique_views,impressions.completion_percent_by_views,playing_time,concurrent_users,widget_form_submitted,cta_clicks - Type: stringworkspace
_id requiredThe five to ten character unique identifier of the Gumlet workspace ID available on the Video Workspaces.
- Type: objectchart
_dimension Metrics result Group by selected dimension, You can select upto 3 dimensions to get nested category result. result will follow selection orders.
- Type: array object[]filters
Build segments of users using multiple filters on the data,
valueshould be an exact match - Type: string enumgroup
_by Data can be grouped by
daily,weeklyormonthly.values- daily
- weekly
- monthly
- application/json
- application/json
- application/json
curl https://api.gumlet.com/v1/insights/viewer-analytics \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"metrics": [
""
],
"workspace_id": "",
"date_range": {
"start_at": "",
"end_at": ""
},
"filters": [
{
"name": "meta_browser",
"value": "",
"operator": "equals"
}
],
"group_by": "daily",
"chart_dimension": {
"group_by": [
{
"name": "custom_video_title"
}
]
}
}'
{
"views": [
{
"x": 1647475200000,
"y": null,
"unit": "views"
},
{
"x": 1647561600000,
"y": null,
"unit": "views"
},
{
"x": 1647648000000,
"y": 6,
"unit": "views"
},
{
"x": 1647734400000,
"y": 24,
"unit": "views"
},
{
"x": 1647820800000,
"y": 33,
"unit": "views"
},
{
"x": 1647907200000,
"y": 16,
"unit": "views"
}
],
"unique_views": [
{
"x": 1647475200000,
"y": null,
"unit": "users"
},
{
"x": 1647561600000,
"y": null,
"unit": "users"
},
{
"x": 1647648000000,
"y": 1,
"unit": "users"
},
{
"x": 1647734400000,
"y": 1,
"unit": "users"
},
{
"x": 1647820800000,
"y": 1,
"unit": "users"
},
{
"x": 1647907200000,
"y": 1,
"unit": "users"
}
]
}
