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

# Analytics

> Track revenue, orders, visitor traffic, and customer acquisition with built-in analytics

Crevio includes a built-in analytics dashboard that gives you a clear view of how your business is performing. From revenue trends to traffic sources, you can monitor the metrics that matter without leaving your dashboard.

## Analytics dashboard

The analytics page is available under **Analytics** in your dashboard. It shows data for a configurable date range (defaulting to the last 30 days) and compares it against the previous period so you can spot trends at a glance.

The dashboard auto-refreshes every 60 seconds, so the numbers stay current as new orders and visits come in.

## Key metrics

The main chart at the top of the page lets you toggle between four primary metrics:

| Metric       | What it tracks                                                                                              |
| ------------ | ----------------------------------------------------------------------------------------------------------- |
| **Leads**    | New lead customers acquired per day -- people who provided their email through a free checkout or waitlist. |
| **Sessions** | Website visits per day. A session represents a single visitor's browsing activity.                          |
| **Orders**   | Orders placed per day across all products.                                                                  |
| **Revenue**  | Total revenue collected per day, displayed in your account's default currency.                              |

Each metric shows:

* The total for the selected period
* A percentage change compared to the previous period of equal length
* A day-by-day trend line

<Tip>
  Use the date range selector to zoom in on a specific promotion, launch, or time window. The previous-period comparison adjusts automatically.
</Tip>

## Traffic analytics

Below the main chart, you will find detailed breakdowns of your website traffic:

### Visits by device

See how your visitors are accessing your site -- desktop, mobile, or tablet. This helps you prioritize design and testing for the devices your audience actually uses.

### Visits by source

Understand where your traffic comes from. Sources include direct visits, search engines, social media platforms, referral links, and any UTM-tagged campaigns you are running.

### Visits by page

See which pages on your website get the most views. Use this to identify your best-performing products, landing pages, and content.

### Visits by country

View a geographic breakdown of your visitors. This can help you decide whether to add support for additional currencies, languages, or region-specific promotions.

## Sales by discount code

Track how your [discount codes](/features/discounts) are performing. This chart shows revenue generated through each active discount code, so you can measure the impact of your promotions and decide which codes to keep, extend, or retire.

## Dashboard overview

Your main **Dashboard** page also surfaces key analytics at a glance:

* **Monthly page views** -- Total website views in the last 30 days
* **Monthly revenue** -- Total revenue from successful orders in the last 30 days
* **Monthly orders** -- Number of orders placed in the last 30 days
* **Recent orders** -- The five most recent orders with customer details

## PostHog integration

For deeper product analytics, Crevio integrates with [PostHog](https://posthog.com). PostHog provides:

* **Event tracking** -- Detailed tracking of user interactions across your dashboard and website
* **User identification** -- Automatic identification of logged-in users for cohort analysis
* **Session recordings** -- Watch how buyers interact with your checkout and product pages
* **Feature flags** -- Roll out new features gradually to subsets of your audience

PostHog runs alongside Crevio's built-in analytics, so you get both a high-level overview in your dashboard and granular event-level data when you need to dig deeper.

## Built-in event tracking with Ahoy

Under the hood, Crevio uses [Ahoy](https://github.com/ankane/ahoy) to track visits and events on your website. Ahoy records:

* **Visits** -- Each unique visitor session, including referrer, device type, browser, OS, and geographic location
* **Events** -- Specific actions taken during a visit, scoped to your account

This data powers the analytics dashboard and is stored within your Crevio account. It is not shared with third parties.

<Note>
  Analytics data is scoped to your account. If you manage multiple accounts, each has its own independent analytics.
</Note>

## Site analytics

Every published Crevio app gets its own real-time site analytics dashboard, available under **Analytics → Site analytics**. It's modelled on Plausible: a clean, single-page view of how people are using your site, with no setup required. Once you publish your site, data starts flowing immediately.

### What's tracked

* **Pageviews and unique visitors** -- in real time, with a live "current visitors" counter
* **Top pages** -- which URLs get the most traffic
* **Top sources** -- where visitors are coming from. You can switch between:
  * **Referrers** -- the external sites that linked to yours (e.g. `google.com`, `producthunt.com`)
  * **UTM source / medium / campaign** -- if you tag your campaign links with `?utm_source=newsletter&utm_medium=email&...`, those break down here
* **Locations** -- countries, regions, and cities your visitors come from
* **Tech** -- browsers, operating systems, and devices (desktop / mobile / tablet)
* **Custom events and revenue** -- when your site fires events like `add_to_cart` or `purchase`, they show up with hit counts and any `value` you pass through (see [Custom events](#custom-events))
* **New vs returning visitors**
* **Goal funnel** -- the share of visitors who progress from landing → product page → checkout → purchase
* **Revenue by source** -- which traffic source generated which orders (see [Revenue attribution](#revenue-attribution))
* **Outbound link clicks and file downloads** -- automatically captured whenever a visitor clicks a link to another domain or to a file (PDF, ZIP, video, etc.)

### What is **not** collected

* No IP addresses are stored
* No browser fingerprinting
* No third-party tracking scripts
* No data is sold or shared with anyone

### Cookies

Crevio site analytics sets exactly one first-party cookie:

| Cookie        | Value                          | Lifetime | Purpose                                                                                                                 |
| ------------- | ------------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------- |
| `_crevio_vid` | Random 32-character hex string | 180 days | Identifies a returning visitor across pages and across days, and ties their pageviews to orders for revenue attribution |

This cookie contains no personal information -- just a random ID generated by the visitor's own browser. Crevio cannot use it to identify anyone. It's a first-party cookie, scoped to your site only, and isn't shared with any other domain.

<Note>
  **EU businesses**: under the GDPR/ePrivacy Directive, analytics cookies generally require visitor consent. Crevio's analytics cookie counts as a first-party analytics cookie. France, Spain, and Italy explicitly exempt first-party analytics from the consent requirement; the proposed EU Digital Omnibus (Nov 2025) would extend that exemption EU-wide. If you sell to other EU countries, the safest move is to include `_crevio_vid` in your cookie banner under "Analytics" and let visitors opt out. We're tracking the regulation and will update this guidance when the Omnibus is finalized.
</Note>

### Privacy signals we honor

* **Global Privacy Control (`Sec-GPC: 1`)** -- 12 US states require websites to recognize GPC as a binding opt-out signal in 2026. When a visitor's browser sends this signal, the tracker skips everything: no cookie, no pageview, no events.
* **Do Not Track** -- DNT is no longer legally enforceable (per 2026 regulatory guidance) and is superseded by GPC. We do not separately check the DNT header.
* **Localhost and development domains** -- the tracker skips itself entirely when running on `localhost`, `*.local`, `*.test`, or `*.localhost`.

## Custom events

Your site can fire custom events from JavaScript to track meaningful actions like starting a checkout, signing up, booking a call, or purchasing:

```js theme={null}
window.crevio("start_checkout", { value: 49.00, plan: "pro" });
window.crevio("signup");
window.crevio("purchase", { value: 199.00, order_id: "ord_abc" });
```

The first argument is the event name. The optional second argument is a small bag of extra properties:

* Use **`snake_case`** event names, with present-tense verbs: `start_checkout`, `book_call`, `submit_form`. Don't use past tense (`booked_call`) or PascalCase (`BookCall`).
* Pass numeric **`value`** if the event is associated with money. It powers the revenue column in the Custom events panel and is summed across hits.
* Keep prop values short. The server keeps at most 8 keys per event, and each value is capped at 200 characters.

Events appear in the **Custom events** panel of the Site analytics dashboard within a minute.

## Revenue attribution

Crevio ties every paid order back to the visitor's first-touch traffic source, so you can answer questions like *"How much revenue did my Product Hunt launch actually drive?"* without leaving the dashboard.

How it works:

1. A visitor lands on your site (say, `?utm_source=producthunt`)
2. The tracker sets the `_crevio_vid` cookie
3. The visitor browses, eventually completes a checkout
4. The checkout records the same `_crevio_vid` value on the order
5. The **Revenue by source** panel groups completed orders by the visitor's first-touch source (UTM source if present, otherwise the referring website, otherwise "Direct"), so you see total revenue per acquisition channel

If a visitor blocks cookies or fires Global Privacy Control, their orders show up in your normal Orders list but aren't attributed in the Revenue by source panel.

## Disabling site analytics

Crevio site analytics is enabled by default on every published app. If you'd rather opt out -- for example, because you use Google Analytics or another tool exclusively -- contact support and we'll disable injection on your account.
