The Insights API lets you pull the same aggregated app metrics you see in Tapcart Insights into your own reports, spreadsheets, or data warehouse. You call Tapcart, and Tapcart returns totals for a date range you choose, such as sessions, revenue, installs, or push campaign performance.
This is a pull API. It requires a merchant API key from Tapcart Support. It is not the same as clickstream webhooks, which push individual shopper events to an endpoint you configure.
In this article:
What the Insights API is (and is not)
How to request your API key
How to make a request
Metrics you can query
Things to know
What the Insights API is
Use the Insights API when you want historical, aggregated reporting, the same kind of numbers shown on Insights charts. Common uses include daily app stats in an internal dashboard, push campaign performance in a spreadsheet, or scheduled pulls into a BI tool.
This is different from other Tapcart data options:
Insights in the dashboard: view the same metrics in Tapcart, including CSV export on most charts. No API key required.
Clickstream webhooks: Tapcart sends live shopper events (product views, add to cart, purchases, and more) to an HTTPS URL you set in Settings. No API key. Webhooks do not return historical totals. See Connecting Clickstream Webhooks.
Analytics integrations (Firebase, Klaviyo, and others): send events into those platforms. Use those when you want data in that tool.
Because you are calling Tapcart for data, Tapcart authenticates every request with your merchant API key.
How to request your API key
A merchant API key is required. It is not available as a self-serve setting in the dashboard yet. Beyond issuing the key, there is no extra Tapcart setup for the Insights API.
To request a key:
Email [email protected] or reach out through LiveChat in your Tapcart dashboard.
Ask for a merchant API key for the Insights API, and include your store name.
Confirm the email address where we should send the key. We send it through a secure link, not in the body of a normal email.
This is your merchant API key. If you also need your Tapcart app ID, ask for that in the same request. You will use both on every API call.
Treat the API key as a secret. Do not share it in public tickets, Slack, or email threads. If you think a key was exposed, contact Tapcart Support so it can be revoked and replaced.
How to make a request
Send a POST request to:
https://api.tapcart.com/insights-pro/v2/metrics
Headers
api-key: your merchant API keyapp-id: your Tapcart app ID
Body (JSON)
metricType: which metric to return (see the list below)appId: your Tapcart app ID (same value as theapp-idheader)startTimestamp: start of the date range, inclusive (ISO 8601, for example2024-01-01T00:00:00Z)endTimestamp: end of the date range, exclusivetimezone: IANA timezone used to bucket times (for exampleAmerica/New_YorkorAmerica/Los_Angeles)granularity:hour,day,week, ormonth. Required for time-series metrics. Ignored for metrics that return a single summary.
Example
Daily sessions for January 2024:
metricType:overview_sessions_by_timeappId: your Tapcart app IDstartTimestamp:2024-01-01T00:00:00ZendTimestamp:2024-02-01T00:00:00Ztimezone:America/New_Yorkgranularity:day
What you get back
Every successful response uses the same envelope: the metric you asked for, your app ID, a count of rows, and a records array. The shape of each record depends on metricType. Currency fields may also appear in extras.
Authentication or validation errors typically return a 4xx status. Server errors typically return a 5xx status and may be retried.
Metrics you can query
These metric types match the reporting you see in Insights. Time-series metrics need a granularity value.
Push Explorer
metricType | What it returns | Needs granularity |
| Performance for each one-off push (sends, sessions, carts, purchases, revenue) | No |
| Performance by automated push type (welcome, abandon cart, and similar) | No |
| Push metrics combined, by time bucket | Yes |
Overview
metricType | What it returns | Needs granularity |
| Sessions by OS, new vs returning, and source (direct, push, deeplink) | Yes |
| Sessions by day of week and hour of day | No |
| App revenue by time bucket | Yes |
Revenue
metricType | What it returns | Needs granularity |
| Revenue and order counts by time bucket | Yes |
| Orders split by direct, push, and inbox attribution | No |
| Discounted vs non-discounted revenue by time bucket | Yes |
| Revenue and orders by iOS vs Android (AOV = revenue / orders) | No |
Acquisition
metricType | What it returns | Needs granularity |
| Daily active devices by OS | Yes |
| Sessions split by direct, push, and deeplink | No |
| Daily unique openers vs installed base | Yes |
| Installs by time bucket and OS | Yes |
| New account creations by time bucket | Yes |
| Average time from first session to first purchase | Yes |
Retention
metricType | What it returns | Needs granularity |
| Customers with one purchase vs two or more, over time | Yes |
| Average session duration by OS | Yes |
| Average sessions per active user by OS | No |
| Daily customer lifetime value snapshots | No (always daily) |
| Active vs dormant device counts | Yes |
| Average orders per customer (guest checkouts excluded) | Yes |
Customer Journey
metricType | What it returns | Needs granularity |
| Sessions to product view to add to cart to purchase | No |
| Top 10 most viewed products | No |
| Top 10 most net-wishlisted products | No |
| Top 10 most purchased products by items sold | No |
For field-by-field response schemas, see the Insights API reference.
Things to know
The API key is required. Every request must include
api-keyandapp-id.Keep the key private. We send it through a secure link. If it is compromised, ask Support to revoke it.
endTimestamp is exclusive. To include all of January, use a start of January 1 and an end of February 1.
This is not a live event stream. You get rolled-up metrics for a date range, not individual shopper actions. For realtime events, use Clickstream Webhooks.
Historical data is included. Unlike webhooks, the Insights API can return metrics for dates before you started using the API, for as long as those metrics exist in Insights.
One-off exports do not need the API. Most Insights charts have a CSV export for the selected date range.
More questions
Developers building the integration can use the full reference here: https://dev.tapcart.com/reference/insights-api.
If you have additional questions about the Insights API, we are happy to help. Reach out through LiveChat in your Tapcart dashboard, or email us at [email protected].
