StackSee Analytics

Framework Guides

Integration guides for popular frameworks

Step-by-step integration guides for popular web frameworks. Each guide includes complete examples for both client-side and server-side tracking.

Available Guides

What's Covered

Each framework guide includes:

  • Installation - Dependencies and environment setup
  • Client-side tracking - Page views, user interactions, and events
  • Server-side tracking - API routes, server actions, and background jobs
  • User identification - Session management and user context
  • Form handling - Progressive enhancement and data submission
  • Common patterns - Auth, errors, protected routes, and more
  • Serverless best practices - Edge functions and deployment

Quick Start by Framework

Next.js App Router

// lib/analytics.ts
import { createClientAnalytics } from '@stacksee/analytics/client';
import { PostHogClientProvider } from '@stacksee/analytics/providers/client';

export const analytics = createClientAnalytics({
  providers: [
    new PostHogClientProvider({
      token: process.env.NEXT_PUBLIC_POSTHOG_KEY!
    })
  ]
});

Full Next.js guide →

SvelteKit

// src/lib/analytics.ts
import { createClientAnalytics } from '@stacksee/analytics/client';
import { PostHogClientProvider } from '@stacksee/analytics/providers/client';
import { PUBLIC_POSTHOG_KEY } from '$env/static/public';

export const analytics = createClientAnalytics({
  providers: [
    new PostHogClientProvider({
      token: PUBLIC_POSTHOG_KEY
    })
  ]
});

Full SvelteKit guide →

Framework-Agnostic Setup

If your framework isn't listed, you can still use @stacksee/analytics! The core concepts remain the same:

  1. Create a client analytics instance for browser code
  2. Create a server analytics instance for server code
  3. Track events using the appropriate instance

Check out the Core Concepts for framework-agnostic guidance.

Coming Soon

We're working on guides for:

  • Vite + React
  • Remix
  • Astro
  • Nuxt

Want to see a specific framework? Open an issue and let us know!

Need Help?

Next Steps

Choose your framework and get started: