Analytics API
Track viewer engagement and retrieve analytics data including page views, unique viewers, read time, geographic breakdown, and device statistics.
Analytics API
The Analytics API lets you track viewer interactions with your publications and retrieve engagement metrics. Analytics data includes page views, unique viewers, read time, page-level heatmaps, geographic distribution, and device breakdowns.
Base URL: https://api.zenflip.io/v1/analytics
Track an Event
Record a viewer interaction event. This is a public endpoint used by the embedded flipbook viewer --- no authentication is required.
Rate limit: 30 events per second per IP address (to accommodate rapid page turns).
Request Body
Field | Type | Required | Description |
| string | Yes | UUID of the publication being viewed |
| string | Yes | Event type (max 30 chars): |
| string | No | Viewer session identifier (max 100 chars) |
| string | No | Anonymous viewer identifier (max 100 chars) |
| integer | No | Page number that was viewed |
| integer | No | Time spent on the page in seconds |
| string | No | Device category: |
| string | No | Browser name (e.g., |
| string | No | Operating system (e.g., |
| string | No | ISO 3166-1 alpha-2 country code (e.g., |
| string | No | City name (max 100 chars) |
| string | No | Referrer URL (max 500 chars) |
| object | No | Arbitrary key-value metadata |
Example Request
Example Response
Organization Overview
Retrieve a high-level analytics summary across all publications in your organization.
Query Parameters
Parameter | Type | Required | Description |
| string | No | Start date in ISO 8601 format (e.g., |
| string | No | End date in ISO 8601 format |
| string | No | Shorthand range: |
Example Request
Example Response
Publication Analytics
Retrieve detailed analytics for a specific publication, including page-level heatmap data, geographic distribution, and device breakdown.
Query Parameters
Parameter | Type | Required | Description |
| string | No | Start date (ISO 8601) |
| string | No | End date (ISO 8601) |
Example Request
Example Response
Response Fields
Field | Description |
| Aggregate metrics for the date range |
| Per-page view counts and average time spent |
| Viewer distribution by country (ISO alpha-2 codes) |
| Breakdown by device type (desktop, mobile, tablet) |
| Breakdown by browser name |
| Daily time series of views and unique viewers |
Export Analytics as CSV
Export raw analytics data as a CSV file for use in spreadsheets or business intelligence tools.
Required plan: Creator or above.
Query Parameters
Parameter | Type | Required | Description |
| string | No | Filter by publication ID |
| string | No | Start date (ISO 8601) |
| string | No | End date (ISO 8601) |
Example Request
Example Response
The CSV string is returned in the data field. Parse it on the client side or save directly to a file.
Event Types Reference
Event Type | Description |
| Viewer opened the publication |
| Viewer navigated to a specific page |
| Viewer closed the publication or navigated away |
| Viewer downloaded the PDF (if enabled) |
| Viewer used the share functionality |