Analytics
The Analytics page (account.{tld}/analytics) shows traffic and
engagement for your active world: page views, unique visitors,
sessions, average session duration, bounce rate, custom events, plus
top surfaces and top events lists. Data is scoped to the world you
currently have selected — switching worlds in the sidebar refreshes
the view.
Where to find it
Sign in to your account, then open World → Analytics in the sidebar. The page is available on every paid plan.
What’s measured
| Metric | What it is |
|---|---|
| Page views | Total surface render events in the period. |
| Unique visitors | Distinct sessions over the period (visitor-identity hashed; no PII). |
| Sessions | Visit windows grouped by 30 minutes of inactivity. |
| Avg. session duration | Median time spent per session. |
| Bounce rate | Sessions that viewed only one surface. |
| Events tracked | Custom events emitted through the analytics API (e.g. cta.click, form.submit). |
| Top surfaces | Most-viewed surfaces in the period, ranked by views. |
| Top events | Most-fired custom event types, ranked by count. |
Each headline metric is paired with a trend badge comparing the current period to the previous one of the same length.
Period filter
Use the dropdown next to the period label to switch between:
- Last hour (
hourlyaggregates) - Last 24 hours (
daily) - Last 7 days (
weekly, default) - Last 30 days (
monthly)
Aggregates are computed server-side and cached for a few minutes, so very recent events may take a moment to appear in the larger windows.
CSV export
Click Export CSV to download the period’s events as a CSV file.
The file is generated on demand from /api/analytics/export and
includes one row per event with the eventType, timestamp,
surfaceId, sessionId, and serialized eventData columns.
Surface-level drill-down
The Analytics page surfaces world-wide totals. For a single surface,
use the PhiCo Studio’s surface detail page — the same backend powers
its per-surface charts. The underlying API endpoint is
GET /analytics/surfaces/:surfaceId, also available via the SDK.
Tracking your own events
Visitor traffic is tracked automatically by the runtime. To record domain-specific events (e.g. a form submission, a click on an upgrade CTA, a checkout completion), call:
import { getApiClient } from 'web-shell/api/client'
await getApiClient().fetch('/api/analytics/events', {
method: 'POST',
body: JSON.stringify({
eventType: 'checkout.completed',
surfaceId: 'sf_abc123',
eventData: { plan: 'pro', currency: 'TRY' },
}),
})Event types are free-form strings; we recommend a domain.action
convention so the Top events list stays readable.
Privacy & data retention
- Visitor identity is derived from a salted hash of IP + user-agent — it is not a tracking cookie and cannot be reversed to the original visitor.
- Event payloads (
eventData) are stored as JSON; do not put email addresses, phone numbers, or other PII into them. - Raw events are retained for 90 days; pre-aggregated daily/weekly/ monthly rollups are kept indefinitely.
Plan availability
All paid plans include access to the Analytics page. There is no storage limit on event volume — fair-use applies at the API tier (per-minute rate limits documented in the SDK reference).