PostHog vs Plausible for SaaS Boilerplates 2026
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
| Feature | PostHog | Plausible | Vercel Analytics |
|---|---|---|---|
| Web page views | Yes | Yes | Yes |
| Custom events | Yes | Yes (limited) | No |
| User identification | Yes | No | No |
| Funnels | Yes | No | No |
| Retention | Yes | No | No |
| Session recording | Yes | No | No |
| Feature flags | Yes | No | No |
| A/B testing | Yes | No | No |
| GDPR (cookie-free) | Optional | Yes | Yes |
| Self-hostable | Yes (free) | Yes ($) | No |
| Free tier | 1M events/mo | No | 2,500 data points |
| Price | Free (hosted) | €9/mo | $10/mo (pro) |
Recommended Setup for SaaS
// 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?
| Boilerplate | Analytics |
|---|---|
| ShipFast | Plausible + Crisp |
| OpenSaaS | Plausible |
| Makerkit | Configurable |
| Midday v1 | OpenPanel (PostHog alternative) |
| T3 Stack | None (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.