TraceKitTraceKit Docs
Analytics

Live Analytics

See online visitors, current pages, engagement, and approximate geography as activity happens.

Enable live presence

Install Browser 0.3.0 or later and initialize it with analytics enabled.

npm install @tracekit/browser@^0.3.0
import { init } from '@tracekit/browser';

init({
  apiKey: 'ctxio_pub_...',
  serviceName: 'your-service-name',
  enabled: true,
});

The SDK sends one presence signal after initialization. It then sends one signal every 27 to 33 seconds while the page is visible. SPA navigation updates the current page for the existing session. Hidden pages stop regular signals and send one hidden-state update.

Online now

TraceKit counts one session as online when it has a recent visible browser tab. The latest visible signal must arrive within the last 90 seconds. Multiple tabs from the same session count as one online visitor.

The dashboard refreshes every 10 seconds while its tab remains visible. It shows the online count, current pages, and active visitors.

Live update timing

The online count is near real time. It can take one dashboard refresh to show a new presence signal.

Visitor globe

Open the globe from the Live Analytics panel. The full-screen rotating globe shows approximate visitor locations and country flags. Country names remain visible even when a country has no current visitor.

Select a visitor to view the current page, source, referrer, browser, device, and session age. The activity stream shows recent pageviews and goal events for that selected visitor. Use the close button to return to the Analytics dashboard.

TraceKit derives approximate geography on the server. The Browser SDK does not request location access. TraceKit does not store the raw IP address with analytics events or presence rows.

Engagement metrics

TraceKit completes a session after 30 minutes without activity. Only completed sessions with at least one pageview enter engagement calculations.

Bounce rate is bounced sessions divided by eligible sessions. A bounced session has one pageview, no goal, and less than 10 visible seconds.

Average session duration is total visible seconds divided by eligible sessions. Active sessions do not enter these completed-session metrics.

Historical Analytics opens with the last 24 hours. You can select the last hour for the most granular view.

Set enabled: false until your consent policy permits analytics collection. Disabled clients create no presence storage, timers, channels, or requests. Query strings and fragments are removed from recorded page paths and referrers.

Continue with goal tracking or Stripe revenue attribution.

On this page