---
title: "Track Dashboard View"
method: POST
path: "/dashboards/url/{url}/track-view"
tags: ["Dashboard"]
---

# Track Dashboard View

`POST /dashboards/url/{url}/track-view`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/dashboards/url/{url}/track-view`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Track a dashboard view event. Returns session_id for subsequent heartbeats.

## Path parameters

- `url` string, required

## Request body

- TrackViewSpec
  - `viewport_w` integer, nullable: window.innerWidth at load
  - `surface` string, nullable: 'viewer' | 'embed' | 'shared'
  - `page_id` string, nullable: The page the viewer opened on

## Response `201`

Document created, URL follows

- TrackViewResponse
  - `session_id` string, nullable: Unique session ID for tracking, or null when the caller is an editor/author whose visit should not be recorded as a view.

## Other responses

- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/fe078afe239b?raw)
