umami
Product
DocsDevelopersPricing
16.8kLog inSign up
General
About
FAQ
Useful links
Getting started
Getting started
Install
Login
Add a website
Collect data
Basics
Add a user
Enable share URL
Track events
Teams
Updates
Languages
Advanced
Tracker configuration
Tracker functions
Environment variables
Reference
API
Authentication
Users
Teams
Websites
Website stats
Sending stats
Event Data
API Client
Cloud
Overview
API key
Import data
Guides
Migrating v1 to v2
Hosting
Running on DigitalOcean
Running on Vercel
Running on Neon Postgres
Running on Netlify
Running on Heroku
Running on Railway
Running on Supabase
Running on PlanetScale
Running on Qovery
Running on CapRover
Running on Koyeb
Running on Forge
Running on Fly.io
umami
Product
FeaturesPricing
Resources
DocsGuidesAPI ReferenceRelease Notes
Community
Get InvolvedGitHubDiscordTwitter
Company
AboutContactPrivacyTerms
© 2023 Umami Software, Inc.

Event Data

Operations around Event data statistics.

Endpoints

GET /api/event-data/events
GET /api/event-data/fields
GET /api/event-data/stats

GET /api/event-data/events

Gets website event and field key record counts within a given time range.

Parameters

  • website_id: (uuid) Website key identifier.
  • startAt: Timestamp (in ms) of starting date.
  • endAt: Timestamp (in ms) of end date.
  • event: (optional) Event Name filter.

Sample response

URL: https://umami.mydomain.com/api/event-data/events?websiteId=d0059975-b79a-4f83-8926-ed731475fded&startAt=1692115200000&endAt=169220159999

[
  { "eventName": "button-click", "fieldName": "id", "dataType": 1, "total": 4 },
  { "eventName": "button-click", "fieldName": "name", "dataType": 1, "total": 4 },
  { "eventName": "track-product-with-data", "fieldName": "productId", "dataType": 1, "total": 2 },
  { "eventName": "track-product-with-data", "fieldName": "price", "dataType": 2, "total": 2 }
]

GET /api/event-data/fields

Gets website field key and value record counts within a given time range.

Parameters

  • website_id: (uuid) Website key identifier.
  • startAt: Timestamp (in ms) of starting date.
  • endAt: Timestamp (in ms) of end date.

Sample response

URL: https://umami.mydomain.com/api/event-data/fields?websiteId=d0059975-b79a-4f83-8926-ed731475fded&startAt=1692115200000&endAt=1692201599999

[
  { "fieldName": "id", "dataType": 1, "fieldValue": "001A", "total": 3 },
  { "fieldName": "id", "dataType": 1, "fieldValue": "002A", "total": 1 },
  { "fieldName": "name", "dataType": 1, "fieldValue": "John", "total": 3 },
  { "fieldName": "name", "dataType": 1, "fieldValue": "Mary", "total": 1 }
]

GET /api/event-data/stats

Gets summarized website events, fields, and records within a given time range.

Parameters

  • website_id: (uuid) Website key identifier.
  • startAt: Timestamp (in ms) of starting date.
  • endAt: Timestamp (in ms) of end date.

Sample response

URL: https://umami.mydomain.com/api/event-data/stats?websiteId=d0059975-b79a-4f83-8926-ed731475fded&startAt=1692115200000&endAt=1692201599999

[{ "events": 16, "fields": 13, "records": 26 }]