Integration Guide

Quick Start

Add Analytics Pro to your application with just a few lines of code:

typescript
import { AnalyticsPro } from '@analytics-pro/client' // Initialize the client const analytics = new AnalyticsPro({ apiKey: 'your-api-key', projectId: 'your-project-id' }) // Track events analytics.track('page_view', { url: window.location.href, referrer: document.referrer })

Supported Platforms

  • React/Next.js Applications
  • Vue.js Applications
  • Plain JavaScript
  • Mobile Apps (React Native)

Event Tracking

Track custom events and user interactions:

typescript
// Track custom events analytics.track('purchase', { productId: 'prod_123', amount: 99.99, currency: 'USD' }) // Track user identification analytics.identify('user_123', { email: 'user@example.com', plan: 'premium' })