Viewer Analytics

This endpoint retrieves viewer analytics data.

Body
application/json
  • date_range
    Type: object
    required

    The timeframe to get the data for. Currently, we only support a maximum of 60 days between start_at and end_at.

  • metrics
    Type: array string[]
    required

    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

  • workspace_id
    Type: string
    required

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

  • chart_dimension
    Type: object

    Metrics result Group by selected dimension, You can select upto 3 dimensions to get nested category result. result will follow selection orders.

  • filters
    Type: array object[]

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

  • group_by
    Type: string enum

    Data can be grouped by daily, weekly or monthly.

    values
    • daily
    • weekly
    • monthly
Responses
  • application/json
  • application/json
  • application/json
Request Example for post/insights/viewer-analytics
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"
    }
  ]
}