Analytics API
API endpoints for retrieving analytics and engagement data.
Overview
The Analytics API provides access to engagement data for your lead magnets. Retrieve view events and email-based analytics summaries.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/analytics | List analytics events |
GET | /api/v1/analytics/email | Get analytics summary for an email |
List Analytics Events
GET /api/v1/analytics
Query analytics events with filters for access links, lead magnets, event types, and date ranges.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
per_page | number | Items per page (default: 20, max: 100) |
access_link_id | string | Filter by specific access link (UUID) |
lead_magnet_id | string | Filter by lead magnet (UUID) |
event_type | string | Filter by event type |
from | string | Start date (ISO 8601 datetime) |
to | string | End date (ISO 8601 datetime) |
Event Types
| Type | Description |
|---|---|
page_viewed | A page was viewed in the document |
download_started | Download was initiated |
download_completed | Download finished successfully |
Example Request
cURL CommandN8N Ready
Response
json
Get Email Analytics
GET /api/v1/analytics/email
Get summarized analytics for a specific email address across all your lead magnets.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address to query |
lead_magnet_id | string | No | Filter to specific lead magnet |
Example Request
cURL CommandN8N Ready
Response
json
Analytics Event Object
| Field | Type | Description |
|---|---|---|
id | string | Unique event identifier |
access_link_id | string | Associated access link |
event_type | string | Type of event |
event_data | object | Event-specific data (e.g., page number) |
ip_hash | string | Hashed IP address (privacy-preserved) |
user_agent | string | Browser/device information |
created_at | string | Event timestamp |
Email Summary Object
| Field | Type | Description |
|---|---|---|
total_links | number | Total access links for this email |
total_views | number | Combined views across all links |
unique_lead_magnets | number | Distinct lead magnets accessed |
first_link_created | string | When first link was created |
last_link_created | string | When most recent link was created |
first_access | string | First view timestamp |
last_access | string | Most recent view timestamp |
Code Examples
Query Recent Views (JavaScript)
javascript
Get Contact Engagement (Python)
python
Rate Limits
Analytics endpoints have specific rate limits:
| Endpoint | Rate Limit |
|---|---|
| List Events | 60/minute |
| Email Summary | 60/minute |
Related
- Lead Magnets API - Manage lead magnets
- Access Links API - Manage access links
- Webhooks - Real-time event notifications