> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crispstats.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> CrispStats is a hosted, privacy-first analytics product. It has no self-hosted edition, no session replay, no heatmaps, no A/B testing and no data import except a site's history from a Plausible export (Settings, Import and export). Websites use the script. iOS, Android, React Native and Flutter use the mobile SDKs in the install guides. Those SDKs are source files, not a published package, and they do not read an advertising id.
> The script global is crispstats(...), site keys start with cs_pk_ and secret API keys start with cs_sk_. The script is served from https://in.crispstats.com/d.js and the REST API lives at https://crispstats.com/api/v1.
> The script tag is the main install; the npm package @crispstats/tracker does the same from code, never alongside the tag. Integrations copy the script tag, the queue stub, crispstats.d.ts and proxy code from these docs or from Settings, Tracking code in the dashboard. A first-party proxy forwards one path of the site to https://in.crispstats.com/p/ and forwards only content-type, user-agent, accept-language, referer, origin, if-none-match and x-forwarded-for, never cookies.

# Free trials and trial-to-paid conversion in CrispStats

> Record free trial starts, see how many convert to paying customers within 60 days, and which sources bring trials that pay. Trials never count as revenue.

A free trial is not a payment, but it is often the step before one. CrispStats records trial starts beside your payments, credits each trial to the visit that brought the person, and shows on the Revenue page how many trials started, how many became paying customers and which sources bring the trials that pay.

The **Free trials** plate appears on the Revenue page once your site has recorded at least one trial.

## What is counted

| Figure | Meaning |
| - | - |
| Trials started | Trials whose start falls in the selected range. |
| Converted | Of those, the trials whose customer paid within 60 days of starting. |
| Conversion rate | Converted divided by trials started, from 0% to 100%. |
| Trials by source | Trials started per source, with the share of each that converted. |

A trial **converts** when the same customer makes a payment on the same site within **60 days** of starting it: a one-time sale, a new subscription or a renewal, of more than zero, from any provider or the API. Refunds and test payments do not count. The customer is matched by any of:

* the same `customerId` (your own user id),
* the same e-mail (compared as a hash, never as sent),
* the same `visitorId`.

The conversion rate divides by **every** trial started in the range, including trials still inside their 60 days. A recent range therefore reads low at first and rises as its trials run their course. For a settled figure, pick a range that ended at least 60 days ago.

Trials follow the page's filters the same way payments do: filter by a source, country or campaign and the plate shows only those trials.

## What trials never change

A trial is stored apart from your payments. It adds nothing to revenue, MRR, customers, average order value or revenue per visitor, never appears in the payments list or the CSV export, and is never announced on Realtime or with the sale sound. Only the later payment counts as revenue.

## How trials are recorded

### Payment API

Send `trial: true` to [`POST /api/v1/sites/{siteId}/payments`](https://docs.crispstats.com/revenue/payment-api#record-a-free-trial) when someone starts a trial, then record their first charge as a normal payment. Trials recorded this way are removed by [`DELETE /payments`](https://docs.crispstats.com/revenue/payment-api#delete-payments) with the same filters.

### Connected providers

A provider records trials only when a webhook CrispStats already receives says a trial started.

| Provider | Trials | How |
| - | - | - |
| RevenueCat | Yes | `INITIAL_PURCHASE` with `period_type` `TRIAL`. Sandbox events are skipped. |
| Superwall | Yes | `initial_purchase` with `period_type` `TRIAL`. Sandbox events are skipped. |
| Stripe | Not yet | A \$0 invoice cannot be told apart from a 100% coupon or a free price. Send trials through the Payment API meanwhile. |
| Paddle, Lemon Squeezy, Polar, Dodo Payments, Creem, Whop, Razorpay, Freemius, Shopify | Not yet | The events CrispStats receives carry no trial start. Use the Payment API. |
| App Store | No | App Store Connect sends reports, not per-customer events. |

Trials come from webhooks as they happen. Importing your payment history does not add past trials.

## Read trials through the API

[`GET /api/v1/sites/{siteId}/revenue`](https://docs.crispstats.com/api-reference/introduction) and the `get_revenue_summary` tool over MCP answer a `trials` object beside the revenue figures: `started`, `converted`, `conversionRate` (0 to 1), `windowDays` and `sources`, each source with its own trials started, converted and rate. It is `null` for a site that has never recorded a trial.

## Next steps

> [card] [Payment API](https://docs.crispstats.com/revenue/payment-api.md)
>
> Record trials, payments, renewals and refunds from your server.

> [card] [Pass the visitor id](https://docs.crispstats.com/revenue/visitor-id-at-checkout.md)
>
> Tie a trial and its first payment to the visit that brought the customer.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.