Resources
Introduction
Phi SDK is a unified platform for analytics, live chat, and user identification. One script, multiple capabilities.
What's Included
Analytics
Pageviews, events, duration
Live Chat
Embedded chat widget
Identification
Link visitors to users
Lightning Fast
Sub-50ms response times. Lightweight script (~3KB gzipped) with zero dependencies.
Privacy-First
No cookies by default. GDPR compliant with automatic IP anonymization.
Duration Tracking
Accurate time-on-page using Visibility API. Only tracks active engagement.
SPA Support
Automatic tracking for React, Vue, Next.js, and other single-page applications.
Quick Start
Add one script tag to start tracking. Analytics are automatic, chat and identification are opt-in.
Basic Installation
Add this to your website's <head> tag:
<script src="https://phi.llc/phi.js" data-id="your-site-id" ></script>
That's it! Pageviews, duration, and device info are tracked automatically.
With Live Chat
Enable the chat widget with one attribute:
<script src="https://phi.llc/phi.js" data-id="your-site-id" data-chat="true" ></script>
Core Features
Analytics
- Automatic pageview tracking with sub-50ms response
- Duration tracking using Visibility API (active time only)
- Custom event tracking with metadata
- Device, browser, and OS detection
- Referrer tracking with UTM parameter support
- Geolocation (country and city-level)
- SPA support (React, Vue, Next.js)
Live Chat
- Embedded chat widget (iframe-based)
- Real-time messaging with admin dashboard
- Pre-chat form for email collection
- Marketing consent checkbox
- Customizable position (bottom-left/right)
- Light and dark theme support
User Identification
- Link anonymous visitors to known users
- Persist identity across sessions
- View identified users in Event Stream
- Enable targeted email campaigns
- Works with any auth system
Dashboard
Access your analytics, chat conversations, and contacts from a unified dashboard at phi.llc/os
Real-time pageviews, duration, top pages, referrers, and geographic data.
View and respond to chat conversations. Email transcripts to visitors.
Manage email contacts collected from chat and identification.
Live feed of all events with user, page, duration, location, and device.
Ready to get started?
Follow our quickstart guide to integrate Phi SDK in under 5 minutes.
Quickstart Guide