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

# Product analytics: users, events and acquisition

> Built-in product analytics for a hosted forge app: who your users are, what they do and where they come from, from dashboards you get with no code, plus custom events and metrics you send yourself.

Product analytics tells you how people use your app: how many there are, whether they come back, what they do, and which channel brought them. A hosted forge app gets four dashboards for it with nothing declared, built from events the app already emits. You add your own events with one function call when the built-in ones aren't enough.

## Where to find it

In the project sidebar, open **Analytics**. It has one tab per built-in dashboard, **Product overview**, **Users**, **Product** and **Acquisition**, and an **Events & metrics** tab for what your own code sends. Each tab is a link, so a colleague can open the same view. The dashboards also appear under **Dashboards** with your other charts, where you can star or copy them.

An **Experiments** tab is reserved for a later feature. There is no feature-flag or experiment product in Reliant today, so you won't see one unless it has been added for you; what the Product dashboard shows about experiments is descriptive and only appears if your app reports flag exposures.

## What each tab shows

**Product overview** is the traffic and users summary: visitors now, visitors, page views, bounce rate, your top pages and channels, JavaScript errors per thousand page views, and active, new and returning users beside the previous period. **Users** covers accounts, daily, weekly and monthly active users, stickiness, a weekly lifecycle (new, retained, resurrected, churned), power users, time from sign-up to activation, and a cohort retention table. **Product** shows page views and visit duration, each route's views, entries and exits, your goals and events with counts, and funnels. **Acquisition** shows visitors, sign-ups and conversion by channel, source, referrer, campaign (`utm_*` parameters), landing page, country, device and browser. Each dashboard opens on a sensible range (24 hours to 30 days) with a comparison to the previous period.

## Where the data comes from

The dashboards read one per-organization table of product events, which the platform fills from four sources. Your browser frontend records `page_viewed` for every route and `page_engaged` for engaged time and scroll depth. Sign-in records standard auth events. Every generated Create, Update and Delete RPC records `<entity>_created`, `_updated` or `_deleted` automatically, with the caller's id and nothing else. And the events you send yourself add to them. Nothing needs configuring: deploy to [Reliant hosting](https://docs.reliantlabs.io/hosting/overview.md) and open the page. The dashboards are hosted-only, because a local `forge env up dev` stack has no product events table.

Visitors are counted without cookies: the platform's ingest edge hashes each request into a visitor id that changes every UTC day, so a person on two days or two devices counts as two **visitors**. **Users** are signed-in people, counted per environment. An agent that needs to reproduce a number can load `reliant forge skill load observability/product-analytics`, which defines each one (visit, bounce, channel rules, same-day stitching, activation).

## Send your own events

An event is a named thing a user did, such as `subscription_started`, with up to 32 properties. From Go:

```go theme={null}
observe.Track(ctx, "project_created", slog.String("template", "go"), slog.Int("repos", 2))
```

and from the browser:

```ts theme={null}
import { track, setTelemetryUser } from "@reliantlabs/forge-web-runtime";

track("onboarding_completed", { plan: "pro" });
setTelemetryUser(session.user.id); // the opaque id, never an email
```

Event names are lowercase snake\_case. Property values are strings of at most 256 characters, so keep them low-cardinality: tags, booleans, counts and buckets, never free text. Never put personal data in a property. `observe.Track` drops a value that looks like an email address, IP address, token or key, the platform's ingest gateway scrubs the same patterns, and `reliant forge lint` flags a property key with an `email`, `name`, `ip`, `url`, `path` or `token` part. `observe.Track` takes the user and organization from the request's authenticated context, so a handler needs no extra step. Server events are recorded whatever the visitor's browser settings are, but a browser that sends Global Privacy Control or Do Not Track is counted without being identified.

The **Events & metrics** tab then lists, for the last 7 days, every custom event with its count, distinct users and last-seen time, and every custom OpenTelemetry metric your services report, with forge's built-in and infrastructure metrics left out. Each entry opens in the metrics explorer. That tab is read-only: you add events in code.

## Customize

Declare goals, the activation event and extra channel rules in the environment's `forge.Analytics` block, and funnels with `forge.Funnel`, then run `reliant forge generate` and redeploy; the panels update with the release. To change a built-in dashboard, save a same-named file under `deploy/observability/dashboards/`, which replaces the generated one. To drop the dashboards altogether, set `dashboards = False` in `forge.Analytics`. To stop browser events, set the analytics mode to `off`. Details: `reliant forge skill load observability/product-events`.

## Limits

* Product events are kept up to 90 days without a paid compute subscription and up to 400 days with one, bounded by the environment's declaration. See [retention](https://docs.reliantlabs.io/hosting/observability/where-it-goes.md#retention-and-usage).
* Each event is one log record, and [billed as log ingestion](https://docs.reliantlabs.io/hosting/observability-billing.md) like any other. Automatic CRUD events can be switched off with `signals = forge.ObservabilitySignals {product_events = False}`.
* Visitor counts are an approximation by design. People behind one office address with the same browser collapse into one visitor, and bots aren't counted.
* Experiments and feature flags are not built into Reliant. An app that already uses an OpenFeature provider can report exposures with `forgeExposureHook`.

## Related topics

* [Hosted dashboards, alerts and issues](https://docs.reliantlabs.io/hosting/observability/dashboards-and-alerts.md): the dashboard model, copies and code dashboards
* [Speed insights](https://docs.reliantlabs.io/forge/observability/speed-insights.md): how fast each page is
* [Session timelines](https://docs.reliantlabs.io/hosting/observability/session-timelines.md): what one visitor did
* [Observability](https://docs.reliantlabs.io/hosting/observability.md), and [`forge obs users`](https://docs.reliantlabs.io/reference/cli#reliant-forge-obs-users) for the same user counts in a terminal
* [Visitors to apps you host with us](https://docs.reliantlabs.io/help/privacy.md#visitors-to-apps-you-host-with-us)


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