Skip to main content

PostHog vs Plausible for SaaS Boilerplates 2026

·StarterPick Team
Share:

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)

Implementing Analytics Without Slowing Down Your SaaS

Analytics scripts have real performance costs. A naively implemented analytics setup adds 50-200ms to your page load time, which hurts conversions more than analytics helps them. The correct implementation loads analytics asynchronously and defers non-critical scripts until after the page is interactive.

For Plausible, the implementation is inherently lightweight — the defer attribute on the script tag ensures it loads after the page content. Plausible's 1.5KB script size means even synchronous loading has minimal impact, but defer is still the correct approach.

For PostHog in Next.js App Router, the initialization should happen in a Client Component that runs after hydration. Initializing PostHog in useEffect rather than at module load time ensures it doesn't block React's hydration phase. The capture_pageview: false configuration is important — with App Router, you handle pageview tracking manually using the usePathname hook, because Next.js's client-side navigation doesn't trigger full page reloads that PostHog's automatic pageview detection would catch.

Session recording deserves careful configuration for GDPR compliance. PostHog records keyboard input by default unless you configure maskAllInputs: true. For EU users, you either need cookie consent (PostHog uses cookies by default) or you configure PostHog in cookieless mode with persistence: 'memory'. The cookieless mode doesn't persist the user identity across page reloads, which means session replay is less useful but GDPR compliance is cleaner.

Community and Ecosystem

PostHog's open-source model gives it a significant ecosystem advantage over most analytics tools. The self-hosted version is actively maintained and receives the same feature updates as the cloud version — this is unusual; most SaaS tools provide inferior self-hosted versions. PostHog's GitHub has 25,000+ stars and an active community contributing integrations, tutorials, and debugging guides.

The PostHog community has produced Next.js-specific packages and guides that go well beyond the official documentation. Community integrations exist for Segment compatibility (if you're migrating from Segment), for dbt (if you export PostHog events to a data warehouse), and for various notification and alerting systems that watch for unusual event patterns.

Plausible's open-source version (Plausible Analytics) is a fully self-hosted alternative to Plausible Cloud. The self-hosted version uses ClickHouse for analytics storage, which requires more infrastructure than a typical SaaS service but gives you complete control over your analytics data. Some privacy-sensitive SaaS products self-host Plausible specifically because even Plausible's privacy-preserving cloud model doesn't satisfy their data residency requirements.

For boilerplate evaluation: PostHog integration quality varies significantly across boilerplates. The difference between a boilerplate that identifies users post-login (connecting analytics identity to app identity), tracks key SaaS events (plan upgrades, feature usage), and configures session replay correctly versus one that just drops the <Script> tag is enormous. When evaluating boilerplates, look for event tracking examples beyond pageviews — that's the signal that the author understands product analytics.

Building an Analytics Event Taxonomy for SaaS

PostHog's power is proportional to the quality of your event tracking. A handful of well-chosen events tracked consistently gives more actionable insight than dozens of events tracked inconsistently. Before implementing PostHog, spend an hour defining your event taxonomy.

The core events that every SaaS should track: user_signed_up (with plan and acquisition source), user_logged_in, subscription_upgraded (with from_plan and to_plan), subscription_cancelled (with cancellation reason if collected), and feature_used (with feature name and key parameters). These five events answer the most important product questions: what's driving signups, what's driving upgrades, and what features correlate with retention.

Beyond the core events, identify the three "activation" events specific to your product — the actions that a user takes in the first week that predict long-term retention. For a project management tool, activation might be "first project created," "first team member invited," and "first task completed." For an AI writing tool, it might be "first document generated," "document exported," and "document shared." Track these activation events from day one; they become the foundation of your onboarding email triggers and product analytics.

Event naming conventions matter at scale. PostHog and Plausible both support custom event names, but inconsistent naming creates confusion as the codebase grows. Adopt a convention early: noun_verb for actions (user_signed_up, file_uploaded, subscription_upgraded), or verb_noun (signup_completed, file_upload_started). Document the convention and the exact events tracked in your codebase, and review the list quarterly to remove redundant events and add missing ones.

The revenue analytics connection is where PostHog's product analytics layer justifies its complexity. By identifying users after signup (posthog.identify(userId, { plan, mrr, createdAt })), you can correlate feature usage with revenue outcomes. Which features do your highest-MRR users use in their first week? Which features predict churn when users stop using them? These questions require event tracking connected to user identity, which PostHog handles natively but Plausible's privacy model deliberately doesn't support. For SaaS products where understanding product-led growth is critical, PostHog's funnel and retention reports built on this event data become primary decision-making tools for the product team. The investment in setting up a thoughtful event taxonomy pays compounding returns as the dataset grows — every month of tracking adds another month of baseline to compare against, making it increasingly possible to detect meaningful changes in user behavior caused by product decisions.


Methodology

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


The right choice between PostHog and Plausible is almost always determined by one question: do you need funnel analysis and feature flags, or do you just need visitor traffic data? PostHog answers both; Plausible answers only the second — but answers it more cheaply and with better privacy compliance. For early-stage SaaS products, Plausible's simplicity removes a decision that PostHog forces you to make: how to use all those analytics features. Most founders don't look at their analytics dashboards beyond basic traffic and conversion metrics in the first six months; paying for PostHog's session recording and feature flag infrastructure before you have enough users to learn from it is common over-engineering.

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

See the full recommended stack including analytics: Ideal tech stack for SaaS in 2026.

Compare the best SaaS boilerplates and their included tooling: Best SaaS boilerplates 2026.

Learn what to look for when evaluating boilerplate quality: Red flags in SaaS boilerplates 2026.

The SaaS Boilerplate Matrix (Free PDF)

20+ SaaS starters compared: pricing, tech stack, auth, payments, and what you actually ship with. Updated monthly. Used by 150+ founders.

Join 150+ SaaS founders. Unsubscribe in one click.