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. Currently, we only support a maximum of 60 days between start_at and end_at.

    Properties: 2
  • Get data for one or more metrics in 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

  • The five to ten character unique identifier of the Gumlet workspace ID available on the Video Workspaces.

  • Group metrics by the selected dimension. You can select up to 3 dimensions for nested category results; results follow the selection order.

    Properties: 1
  • 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.

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.chartData({
  metrics: [''],
  workspace_id: '',
  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"
    }
  ]
}