Every event your ledger declares is counted from the moment it is synced: how often it happens, how often it fails and how slow it is, by environment and app version. That fills the console's Dashboard with no setup. This page goes one step further, to a view of your own: the people using your app, and how many of them buy.
1. Mark who your users are
In logika.json, mark the param that identifies a person as an identity. Logika then keeps one row per value per day, for exact active users and retention:
"user_id": {"type": "str", "identity": true}
A param with few values worth grouping by (provider, plan) can be a dimension.
2. Declare a funnel
A funnel names its steps by event and identity, and how long a person has to get through them:
"funnels": [{"name": "purchase", "within": "1h",
"steps": ["landing.viewed.user_id", "cart.added.user_id", "checkout.captured.user_id"]}]
3. Put them on a view
A view is a list of panels. Each panel can carry a title in plain words and the sentence it opens with:
"views": [{"name": "overview", "panels": [
{"identity": "user_id", "show": "actives", "title": "People using the app", "answer": "{latest} people a day · {change}"},
{"funnel": "purchase", "title": "Who buys", "answer": "{conversion} of visitors bought, {range}"}]}]
4. Check and sync
logika check
logika sync
Within minutes of the sync, the declarations are filled in from the data already stored: the funnel shows the past month at once (three days on the free demo). Open the project's Analytics in the console.
You rarely need to write these by hand. In a reflection round, your agent reads how people actually use the app and proposes each declaration with what it would show; you choose.
For your agent
Every panel is a command away, in the dense form agents read:
logika query actives '{"identity": "user_id", "window": "day", "env": "prod", "from": "30d"}'
logika query funnel '{"name": "purchase", "env": "prod", "from": "30d"}'
The analytics guide has every declaration, the panels, what changed and how Logika judges it.