Skip to main content

PostHog vs Plausible for SaaS Boilerplates 2026

·StarterPick Team
posthogplausibleanalyticssaas-boilerplateproduct-analytics2026

Analytics: Two Different Questions

SaaS analytics tools answer different questions:

Plausible answers: "Where are my visitors coming from, what pages are they viewing, and are they converting?" — web analytics, traffic, and conversion.

PostHog answers: "What are my users doing inside my app, what features are they using, and why are they churning?" — product analytics, user behavior, and retention.

Both are useful. They are not competitors — they serve different purposes. Many SaaS products use both.

TL;DR

  • Plausible: Privacy-first web analytics. No cookies, no GDPR consent banners. Best for landing page and marketing analytics. €9/mo.
  • PostHog: Full product analytics suite. Events, funnels, session recording, feature flags, A/B tests. Free tier generous (1M events/month).
  • Vercel Analytics: Built-in to Vercel deployments. Basic web vitals and page views. Adequate for basic traffic monitoring.

Key Takeaways

  • PostHog free tier: 1M events/month — sufficient for most early-stage SaaS
  • Plausible: GDPR compliant by default — no consent banner needed
  • PostHog is open-source and can be self-hosted — zero cost for self-hosters
  • PostHog feature flags replace LaunchDarkly for basic feature flagging at no extra cost
  • Session replay (PostHog) is essential for understanding where users get stuck
  • Most boilerplates default to Plausible (simpler); PostHog requires more implementation

Plausible: Lightweight Web Analytics

Plausible is a 1.5KB script with no cookies, no GDPR issues, and a simple dashboard showing traffic, sources, and conversions.

# No npm package needed — just add a script tag
// app/layout.tsx — Plausible script:
export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html>
      <head>
        <Script
          defer
          data-domain="yourdomain.com"
          src="https://plausible.io/js/script.js"
        />
      </head>
      <body>{children}</body>
    </html>
  );
}
// Custom events with Plausible:
// Define a custom event (goal) in Plausible dashboard,
// then trigger it in your code:
declare global {
  interface Window {
    plausible: (event: string, options?: { props: Record<string, string> }) => void;
  }
}

export function trackPlausibleEvent(name: string, props?: Record<string, string>) {
  if (typeof window !== 'undefined' && window.plausible) {
    window.plausible(name, props ? { props } : undefined);
  }
}

// In your code:
trackPlausibleEvent('Signup', { plan: 'pro' });
trackPlausibleEvent('Checkout Started', { amount: '49' });
trackPlausibleEvent('Feature Used', { feature: 'export' });

Plausible pricing: €9/mo up to 10K page views; €19/mo up to 100K; €29/mo up to 200K. No per-seat pricing.


PostHog: Full Product Analytics

PostHog is an all-in-one product analytics platform:

npm install posthog-js posthog-node
// lib/posthog.ts — server-side client:
import { PostHog } from 'posthog-node';

export const posthog = new PostHog(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
  host: process.env.NEXT_PUBLIC_POSTHOG_HOST!,
  flushAt: 1,  // Send immediately in serverless
  flushInterval: 0,
});
// providers/PostHogProvider.tsx — client-side:
'use client';
import posthog from 'posthog-js';
import { PostHogProvider } from 'posthog-js/react';
import { useEffect } from 'react';

export function PHProvider({ children }: { children: React.ReactNode }) {
  useEffect(() => {
    posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
      api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST || 'https://app.posthog.com',
      capture_pageview: false,  // We handle this manually in the router
      session_recording: {
        maskAllInputs: true,  // GDPR: don't record passwords
      },
    });
  }, []);

  return <PostHogProvider client={posthog}>{children}</PostHogProvider>;
}
// app/layout.tsx:
import { PHProvider } from '@/providers/PostHogProvider';
import { PostHogPageView } from '@/components/PostHogPageView';

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <PHProvider>
          <PostHogPageView />
          {children}
        </PHProvider>
      </body>
    </html>
  );
}

Tracking Key SaaS Events

import { usePostHog } from 'posthog-js/react';

export function SignupForm() {
  const posthog = usePostHog();

  const handleSignup = async () => {
    // Track the event:
    posthog.capture('user_signed_up', {
      plan: selectedPlan,
      source: referralSource,
    });

    // Identify the user after signup:
    posthog.identify(userId, {
      email: user.email,
      name: user.name,
      plan: user.plan,
      created_at: new Date().toISOString(),
    });
  };
}

// Track subscription events:
posthog.capture('subscription_upgraded', {
  from_plan: 'free',
  to_plan: 'pro',
  mrr: 49,
});

// Track feature usage:
posthog.capture('feature_used', {
  feature: 'bulk_export',
  format: 'csv',
});

Feature Flags

PostHog includes feature flags at no extra cost:

// Check a feature flag server-side:
import { posthog } from '@/lib/posthog';

export async function getUserFeatureFlags(userId: string) {
  const flags = await posthog.getAllFlags(userId);
  return flags;
}

// Client-side:
import { useFeatureFlagEnabled } from 'posthog-js/react';

export function NewFeatureButton() {
  const isEnabled = useFeatureFlagEnabled('new-dashboard-v2');

  if (!isEnabled) return null;
  return <Button>Try New Dashboard</Button>;
}

Session Recording

PostHog records user sessions (with input masking for GDPR). Essential for debugging and understanding user behavior:

// Start recording for specific users only:
posthog.startSessionRecording();

// Or configure globally:
posthog.init(key, {
  session_recording: {
    maskAllInputs: false,
    maskInputOptions: { password: true, email: false },
  },
});

Comparison Table

FeaturePostHogPlausibleVercel Analytics
Web page viewsYesYesYes
Custom eventsYesYes (limited)No
User identificationYesNoNo
FunnelsYesNoNo
RetentionYesNoNo
Session recordingYesNoNo
Feature flagsYesNoNo
A/B testingYesNoNo
GDPR (cookie-free)OptionalYesYes
Self-hostableYes (free)Yes ($)No
Free tier1M events/moNo2,500 data points
PriceFree (hosted)€9/mo$10/mo (pro)

// Use both:
// 1. Plausible for marketing/landing page analytics
// 2. PostHog for in-app product analytics

// Install both side by side:
// - Plausible: Landing page (/), blog, docs, pricing
// - PostHog: Authenticated app (/dashboard/*)

// Configure in layout:
// app/(marketing)/layout.tsx → Plausible only
// app/(app)/layout.tsx → PostHog only

// This way:
// - Marketing: No GDPR consent needed (Plausible is cookie-free)
// - App: Full product analytics with PostHog

Which Boilerplates Use What?

BoilerplateAnalytics
ShipFastPlausible + Crisp
OpenSaaSPlausible
MakerkitConfigurable
Midday v1OpenPanel (PostHog alternative)
T3 StackNone (add manually)

Methodology

Based on publicly available documentation from PostHog, Plausible, and Vercel Analytics, pricing pages, and boilerplate analysis as of March 2026.


Setting up analytics for your SaaS? StarterPick helps you find boilerplates pre-configured with the analytics stack that fits your product.

Comments