Event Analytics
Query in-app event data tracked by your mobile SDKs.
Overview
These endpoints expose event data from your mobile app's trackEvent() and trackRevenue() calls. All endpoints are scoped to your organization and require the analytics:events permission (Pro and Unlimited plans).
Get Event Overview
GET /api/analytics/events/overview
Retrieve summary statistics for the Events dashboard header cards.
Authentication
Requires a valid JWT or API key. See Authentication.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
days | number | No | 30 | Number of days to include (1-365) |
Response
{
"totalEvents": 4821,
"uniqueEventNames": 12,
"eventsToday": 87,
"totalRevenue": 2493.50,
"topEvents": [
{
"eventName": "screen_view",
"count": 1892,
"lastOccurred": "2026-03-03T18:42:00.000Z"
},
{
"eventName": "purchase",
"count": 634,
"lastOccurred": "2026-03-03T18:38:12.000Z"
},
{
"eventName": "signup",
"count": 312,
"lastOccurred": "2026-03-03T17:55:00.000Z"
}
]
}
Example
curl "https://api.linkforty.com/api/analytics/events/overview?days=30" \
-H "Authorization: Bearer $LINKFORTY_API_KEY"
Get Event Timeline
GET /api/analytics/events/timeline
Retrieve daily event counts for charting.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
days | number | No | 30 | Number of days to include |
eventName | string | No | — | Filter to a specific event name |
Response
Returns an array with one entry per day. Days with no events have count: 0.
{
"timeline": [
{ "date": "2026-02-01", "count": 45 },
{ "date": "2026-02-02", "count": 0 },
{ "date": "2026-02-03", "count": 72 }
]
}
Example
# All events, last 7 days
curl "https://api.linkforty.com/api/analytics/events/timeline?days=7" \
-H "Authorization: Bearer $LINKFORTY_API_KEY"
# Only purchase events
curl "https://api.linkforty.com/api/analytics/events/timeline?days=30&eventName=purchase" \
-H "Authorization: Bearer $LINKFORTY_API_KEY"
List Events
GET /api/analytics/events/list
Retrieve a paginated feed of individual events.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
days | number | No | 30 | Number of days to include |
eventName | string | No | — | Filter to a specific event name |
page | number | No | 1 | Page number |
limit | number | No | 50 | Events per page (max 100) |
search | string | No | — | Search event names (case-insensitive) |
Response
{
"events": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"eventName": "purchase",
"eventData": {
"revenue": 29.99,
"currency": "USD",
"productId": "sku-123"
},
"eventTimestamp": "2026-03-03T18:38:12.000Z",
"installId": "f1e2d3c4-b5a6-0987-fedc-ba0987654321",
"linkId": "11223344-5566-7788-99aa-bbccddeeff00",
"linkShortCode": "abc123",
"linkTitle": "Spring Sale Campaign"
}
],
"total": 634,
"page": 1,
"limit": 50
}
Example
curl "https://api.linkforty.com/api/analytics/events/list?page=1&limit=10&eventName=purchase" \
-H "Authorization: Bearer $LINKFORTY_API_KEY"
Get Event Names
GET /api/analytics/events/names
Retrieve all distinct event names with their total counts. Useful for populating filter dropdowns.
Response
{
"eventNames": [
{ "name": "screen_view", "count": 1892 },
{ "name": "purchase", "count": 634 },
{ "name": "signup", "count": 312 },
{ "name": "revenue", "count": 289 },
{ "name": "add_to_cart", "count": 178 }
]
}
Example
curl "https://api.linkforty.com/api/analytics/events/names" \
-H "Authorization: Bearer $LINKFORTY_API_KEY"
Export Events
GET /api/analytics/events/export
Export raw event data in JSON or CSV format. Requires the analytics:export permission.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
days | number | No | 30 | Number of days to include |
eventName | string | No | — | Filter to a specific event name |
format | string | No | json | json or csv |
limit | number | No | 1000 | Max events to return |
offset | number | No | 0 | Offset for pagination |
JSON Response
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"eventName": "purchase",
"eventData": { "revenue": 29.99, "currency": "USD" },
"eventTimestamp": "2026-03-03T18:38:12.000Z",
"installId": "f1e2d3c4-b5a6-0987-fedc-ba0987654321",
"linkId": "11223344-5566-7788-99aa-bbccddeeff00",
"linkShortCode": "abc123",
"linkTitle": "Spring Sale Campaign"
}
],
"pagination": {
"total": 634,
"limit": 1000,
"offset": 0,
"hasMore": false
}
}
CSV Response
When format=csv, the response is plain text CSV:
id,eventName,eventData,eventTimestamp,installId,linkId,linkShortCode,linkTitle
a1b2c3d4-...,purchase,"{""revenue"":29.99}",2026-03-03T18:38:12.000Z,f1e2d3c4-...,11223344-...,abc123,Spring Sale Campaign
Examples
# JSON export
curl "https://api.linkforty.com/api/analytics/events/export?days=30&format=json" \
-H "Authorization: Bearer $LINKFORTY_API_KEY"
# CSV export, only purchase events
curl "https://api.linkforty.com/api/analytics/events/export?days=90&eventName=purchase&format=csv" \
-H "Authorization: Bearer $LINKFORTY_API_KEY" \
-o events.csv
Revenue Convention
All LinkForty SDKs use a standardized format for revenue events:
| Field | Value |
|---|---|
| Event name | revenue |
eventData.revenue | Numeric amount (e.g., 29.99) |
eventData.currency | ISO 4217 currency code (e.g., USD) |
The totalRevenue field in the overview endpoint sums eventData.revenue from all events with eventName = 'revenue'.
Use trackRevenue() in the SDK rather than manually calling trackEvent('revenue', ...) to ensure this format:
// Correct - uses standardized format
LinkForty.trackRevenue(29.99, 'USD', { orderId: 'order-123' });
// Also works, but prefer trackRevenue()
LinkForty.trackEvent('revenue', { revenue: 29.99, currency: 'USD', orderId: 'order-123' });
Error Responses
| Status | Description |
|---|---|
| 401 | Missing or invalid authentication |
| 403 | Plan does not include event analytics (Free tier) |
| 429 | API rate limit exceeded |
Permissions
All event analytics endpoints require the analytics:events permission, available to owner, admin, and member roles on Pro and Unlimited plans. The export endpoint additionally requires analytics:export.