---
title: "Gets aggregated event metrics for the account."
method: GET
path: "/adhawk/eventmetrics"
tags: ["AdHawk"]
---

# Gets aggregated event metrics for the account.

`GET /adhawk/eventmetrics`

## Request

- Base URL: `https://api.reveldigital.com`
- URL: `https://api.reveldigital.com/adhawk/eventmetrics`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://id.reveldigital.com/connect/authorize`
    - Token URL: `https://id.reveldigital.com/connect/token` scopes: `webapi`
  - API key in header `X-RevelDigital-ApiKey`
  - API key in query parameter `api_key`
- TypeScript: <https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/docs/adhawk/eventmetrics/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `startDate` string, date-time
- `endDate` string, date-time
- `deviceId` string[]
- `eventName` string[]
- `interval` 'Minute' | 'Hour' | 'Day' | 'Week' | 'Month'
- `groupByDevice` boolean
- `groupByEvent` boolean
- `limit` integer

## Response `200`

OK

- AdHawkEventMetrics[]
  - `device_id` string, nullable: The device ID
  - `device_name` string, nullable: The device name
  - `event_name` string, nullable: The event name (when grouping by event)
  - `period_start` string, date-time: Start of the time period for these metrics
  - `period_end` string, date-time: End of the time period for these metrics
  - `total_events` integer: Total number of events
  - `unique_sessions` integer: Number of unique sessions
  - `unique_event_names` integer, nullable: Number of unique event names (when not grouping by event)
  - `unique_devices` integer, nullable: Number of unique devices (when not grouping by device)

---

[API](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api.md) - [All operations](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/revisions/39d5c8302822?raw)
