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

MetricWhat it is
Page viewsTotal surface render events in the period.
Unique visitorsDistinct sessions over the period (visitor-identity hashed; no PII).
SessionsVisit windows grouped by 30 minutes of inactivity.
Avg. session durationMedian time spent per session.
Bounce rateSessions that viewed only one surface.
Events trackedCustom events emitted through the analytics API (e.g. cta.click, form.submit).
Top surfacesMost-viewed surfaces in the period, ranked by views.
Top eventsMost-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 (hourly aggregates)
  • 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).