Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tobiaskocur/sajko-tracker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@sajko/tracker

Advanced session replay and analytics for modern web applications.

Packages

Quick Start

Installation

# Core package
npm install @sajko/tracker

# Framework-specific packages
npm install @sajko/react     # For React
npm install @sajko/nextjs    # For Next.js
npm install @sajko/vue       # For Vue.js

Basic Usage

Vanilla JavaScript

import { init } from '@sajko/tracker';

const sajko = await init({
  websiteId: 'your-website-id',
  apiEndpoint: 'https://api.sajko.sk', // Optional
  hasUserConsent: true
});

// Track custom events
sajko.track('button_click', { button: 'cta' });

React

import { SajkoProvider, useTracker } from '@sajko/react';

function App() {
  return (
    <SajkoProvider config={{ websiteId: 'your-website-id' }}>
      <YourApp />
    </SajkoProvider>
  );
}

function Component() {
  const { sajko, loading } = useTracker();
  
  const handleClick = () => {
    sajko?.track('button_click', { button: 'cta' });
  };
  
  return <button onClick={handleClick}>Track Event</button>;
}

Next.js

// app/layout.tsx
import { SajkoScript } from '@sajko/nextjs';

export default function RootLayout({ children }) {
  return (
    <html>
      <head>
        <SajkoScript config={{ websiteId: 'your-website-id' }} />
      </head>
      <body>{children}</body>
    </html>
  );
}

Features

  • 📹 Session Replay - Record and replay user sessions
  • 🔥 Heatmaps - Visualize user interactions
  • 📊 Analytics - Track user behavior and conversions
  • 🚀 Performance - Optimized with WASM compression
  • 🔒 Privacy-First - GDPR compliant with PII masking
  • 🎯 Flow Tracking - Monitor user journeys
  • 💾 Offline Support - Queue events when offline
  • 🎨 Framework Support - React, Next.js, Vue.js, and more

Development

# Install dependencies
npm install

# Build all packages
npm run build

# Run tests
npm run test

# Start development mode
npm run dev

Examples

Check out the examples directory for complete implementations:

Documentation

Visit docs.sajko.sk for full documentation.

License

MIT © SAJKO Team

About

Advanced session replay and analytics for modern web apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 57.0%
  • JavaScript 43.0%