Viewer Analytics

​

This endpoint retrieves viewer analytics data. This endpoint is use for deep insights on the analytics data.

Body

application/json
  • The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.

    Properties: 2
  • Get data for one or more metrics in the same request. Supported values: views, unique_views, impressions, completion_percent_by_views, playing_time, concurrent_users, widget_form_submitted, and cta_clicks.

    values
    • views
    • unique_views
    • impressions
    • completion_percent_by_views
    • playing_time
    • concurrent_users
    • widget_form_submitted
    • cta_clicks
  • Group metrics by the selected dimension. You can select up to 3 dimensions for nested category results; results follow the selection order.

    Properties: 1
  • Whether the request is to download the chart data

  • Build segments of users using multiple filters on the data, value should be an exact match

    Properties: 3
  • Data can be grouped by daily, weekly or monthly.

  • Gumlet workspace ID

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/insights/viewer-analytics
import Gumlet from '@gumlet/nodejs-sdk';

const client = new Gumlet({
  apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});

const videoAnalytic = await client.videoAnalytics.viewerData({
  metrics: ['views'],
  date_range: {
    start_at: '2024-01-01',
    end_at: '2024-01-01',
  },
  group_by: 'daily',
});

console.log(videoAnalytic);
{
  "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"
    }
  ]
}