A lightweight, zero-dependency behavioral telemetry SDK
Capture clicks, scrolls, keypresses, and heatmap data with a drop-in script tag or clean JS API in less than
20 kB.
Interact with this page to watch telemetry capture events in real-time.
Move your mouse, click anywhere, scroll the page, or type in the forms to populate this feed.
Hover & Draw Here
Mouse moves draw blue glows, touches draw pink glows
Experiment with PII data masking and trigger the JavaScript APIs directly.
How Telesense stacks up against legacy analytics and session recorders.
| Feature | Telesense | Hotjar | Mixpanel | Heap |
|---|---|---|---|---|
| Bundle Footprint | < 20 kB (minified) | ~60 kB | ~80 kB | ~120 kB |
| Self-Host Option | ✓ Yes | ✗ No | ✗ No | ✗ No |
| Zero Dependencies | ✓ Yes | ✗ No | ✗ No | ✗ No |
| Custom Transport Hooks | ✓ Yes | ✗ No | ✗ No | ✗ No |
| TypeScript Ready | ✓ Yes | ✗ No | Partial | Partial |
| Open Source License | ✓ MIT | ✗ Closed | ✗ Closed | ✗ Closed |
Learn how to drop in Telesense and customise your data streams.
<!-- 1. Configure the script options before loading -->
<script>
window.TELE_CONFIG = {
endpoint: '/telemetry', // Send queue logs to your custom server endpoint
flushInterval: 5000 // Flush queue automatically every 5 seconds
};
</script>
<!-- 2. Load the lightweight bundle -->
<script src="https://cdn.jsdelivr.net/npm/telesense/dist/tele.umd.min.js"></script>
<!-- 3. SDK automatically hooks up DOM listeners and is ready to use -->
<script>
tele.on('click', event => {
console.log('User clicked:', event.x, event.y);
});
</script>
// Install via: npm install telesense
import tele from 'telesense';
// Configure settings at runtime
tele.config({
endpoint: 'https://api.yourdomain.com/telemetry',
capture: {
mousemove: false // Example: skip tracking mouse moves to save network data
}
});
// Listen to any event type
tele.on('*', evt => {
console.log(`Logged: ${evt.type}`);
});
// Record custom events with payload
tele.track('purchase_completed', {
amount: 29.99,
currency: 'USD'
});
import tele from 'telesense';
// Intercept the flush batching mechanism and route to custom handlers
tele.config({
onFlush: async (events) => {
// Send batches to your custom logging microservice or analytics provider
// IMPORTANT: Always validate data in server-side!
await fetch('/my-analytics-gateway', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
sentAt: Date.now(),
payload: events
})
});
}
});
-- 1. Create a table in your Supabase SQL editor
create table telemetry_events (
id bigint generated always as identity primary key,
session_id text not null,
event_json jsonb not null,
created_at timestamptz default now()
);
alter table telemetry_events enable row level security;
create policy "anon_insert" on telemetry_events for insert to anon with check (true);
create policy "anon_select" on telemetry_events for select to anon using (true);
// 2. Configure Telesense directly in your frontend app
tele.config({
supabaseUrl: 'https://yourproject.supabase.co',
supabaseAnonKey: 'your-anon-public-key'
});