Phi SDK v2.1

One script.
Full intelligence.

Add analytics, chat, and user identification to any website. Lightweight, privacy-first, and cookie-free.

Single script, no dependenciesNo cookies by defaultReal-time data

Quick Start

1. Add the script

html
<script 
  src="https://phi.llc/phi.js" 
  data-id="YOUR_SITE_ID"
></script>

Add this before the closing </body> tag. Get your site ID from the dashboard.

2. Enable features

html
<script 
  src="https://phi.llc/phi.js" 
  data-id="YOUR_SITE_ID"
  data-chat="true"
  data-track-clicks="true"
  data-scroll-depth="true"
></script>

Enable chat widget, click tracking, scroll depth, and more with data attributes.

Features

Real-Time Analytics

Pageviews, sessions, visitors, and custom events

Built-in Chat

Live chat widget with AI-powered responses

User Identification

Link anonymous visitors to known users

QR Tracking

Generate and track QR codes with UTM params

JavaScript API

phi.identify()

Link the current visitor to a known user. This enables cross-session tracking and personalization.

javascript
// Identify logged-in users
phi.identify({
  email: 'user@example.com',
  name: 'Jane Doe',
  plan: 'premium'
});

phi.track()

Track custom events with optional properties. Events appear in real-time on your dashboard.

javascript
// Track custom events
phi.track('purchase', {
  amount: 99.00,
  currency: 'USD',
  product: 'Premium Plan'
});

// Track form submissions
phi.track('form_submit', {
  form_name: 'contact',
  email: formData.email
});

Configuration Options

AttributeTypeDescription
data-id*stringYour site ID (required)
data-chatbooleanEnable chat widget
data-chat-theme'dark' | 'light'Chat widget theme
data-track-clicksbooleanTrack all click events
data-scroll-depthbooleanTrack scroll depth
data-outbound-linksbooleanTrack outbound link clicks
data-web-vitalsbooleanTrack Core Web Vitals
data-honor-dntbooleanHonor Do Not Track header
data-debugbooleanEnable debug logging

Ready to get started?

Create a free account to get your site ID and start tracking.