Asset Analytics

​

Get video analytics for a single asset.

Path Parameters

  • Gumlet asset ID

Body

application/json
  • Properties: 2
  • Group the data by this period.

  • List of metrics to return in response.

    values
    impressionsviewsplaying_timetop_countriestop_pagestop_citiestop_device_typestop_browsersheatmapwidget_data
  • Page number to fetch. Starting at 1

  • Number of items to return per page

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/video/assets/{asset_id}/analytics
import Gumlet from '@gumlet/nodejs-sdk';

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

const videoAsset = await client.videoAssets.analytics('assetId', {
  group_by: 'daily',
  date_range: {
    start_at: '2024-01-01',
    end_at: '2024-01-01',
  },
  metrics: ['impressions'],
});

console.log(videoAsset);
{
  "heatmap": [
    {
      "bucket": "string",
      "count": 1
    }
  ],
  "views": [
    {
      "date": 1,
      "value": 1
    }
  ],
  "playing_time": [
    {
      "date": 1,
      "value": 1
    }
  ],
  "01M2QP6KS1HM1JE912S8K9DJ2N": null,
  "impressions": [
    {
      "date": 1,
      "value": 1
    }
  ],
  "top_countries": [
    {
      "key": "string",
      "views": "string",
      "impressions": "string"
    }
  ],
  "top_pages": [
    {}
  ],
  "top_cities": [
    {
      "key": "string",
      "views": "string",
      "impressions": "string"
    }
  ],
  "top_browsers": [
    {
      "key": "string",
      "views": "string",
      "impressions": "string"
    }
  ],
  "top_device_types": [
    {
      "key": "string",
      "views": "string",
      "impressions": "string"
    }
  ],
  "widget_data": {
    "hasMore": true,
    "widgetData": [
      {
        "asset_id": "string",
        "page_url": "string",
        "playback_time_instant_milli": "string",
        "workspace_id": "string",
        "timestamp": "string",
        "email": "string",
        "name": "string"
      }
    ]
  }
}