Skip to main content

Self-Host Plausible vs Google Analytics 2026

·OSSAlt Team
plausiblegoogle-analyticsanalyticsself-hostinggdprprivacydocker2026
Share:

Self-Host Plausible vs Google Analytics 2026

TL;DR

Self-hosted Plausible is GDPR-compliant by default, weighs under 1KB, requires no cookie consent banner, and runs entirely on your infrastructure. Google Analytics 4 is free at the surface but costs 45KB of script weight per page load, sends all visitor data to Google's servers, requires explicit GDPR consent in most EU jurisdictions, and becomes a compliance liability for regulated products. For privacy-conscious teams, the math is simple: Plausible self-hosted at $60–120/year of server costs beats GA4's hidden costs in performance, compliance, and data ownership.

Key Takeaways

  • Script weight: Plausible ~1KB vs Google Analytics 4 ~45KB — a 45x difference that directly affects page speed scores
  • GDPR compliance: Plausible is cookieless by default — no consent banner required in most EU jurisdictions; GA4 requires explicit opt-in under GDPR
  • Data residency: Self-hosted Plausible keeps all data on your servers; GA4 sends data to Google's US-based infrastructure regardless of billing region
  • Feature parity: Plausible covers pageviews, referrers, goals, funnels, custom events, revenue tracking, and GSC integration — GA4 adds heatmaps integration, advanced attribution, and BigQuery export for larger teams
  • Self-hosting cost: ~$5–10/month on a small VPS handles up to 1–2M pageviews/month for Plausible; GA4 is "free" but costs nothing only if compliance, privacy, and page speed have no value to you
  • Setup time: Plausible Docker Compose deploys in under 30 minutes; GA4 requires a Google account and accepts data immediately but configuring meaningful reports takes hours

Why Teams Are Leaving Google Analytics in 2026

Google Analytics 4 completed its forced migration from Universal Analytics in July 2023. The reaction was widespread frustration. UA had familiar session-based reports; GA4 replaced them with an event-based model that requires custom Explore reports to answer basic questions UA answered by default.

Beyond the UX regression, three compliance pressures accelerated departures:

Austrian DPA ruling (2022): The Austrian Data Protection Authority found GA illegal under GDPR because visitor data is transferred to Google servers in the US. Similar rulings followed in France, Italy, Denmark, and other EU member states. By 2026, using GA4 without a Data Processing Addendum, Consent Mode v2, and valid cross-border transfer mechanism is a compliance risk for any EU-targeting product.

UK ICO guidance (2024): Post-Brexit UK guidance tightened requirements for analytics cookies. GA4 requires consent under PECR (Privacy and Electronic Communications Regulations) for UK-based users.

Core Web Vitals impact: GA4's 45KB script directly affects Largest Contentful Paint and Total Blocking Time — two Core Web Vitals metrics that influence Google Search ranking. A site adding GA4 is potentially hurting its own SEO with the same tool meant to measure it.

Self-hosted Plausible solves all three: no data leaves your server, no cookies means no consent banner in most jurisdictions, and the 1KB script is negligible on any modern connection.


GDPR and CCPA: The Compliance Comparison

Google Analytics 4

GA4 collects multiple data points that constitute personal data under GDPR:

  • IP address: GA4 anonymizes IPs, but the non-anonymized address is still processed en route to Google's servers
  • Client ID (_ga cookie): A persistent identifier stored for up to 2 years — a cookie that requires explicit consent under GDPR
  • User ID: If you pass authenticated user IDs to GA4, those must be handled under GDPR's purpose limitation principle
  • Google Signals: Cross-site behavioral tracking via Google account login — requires explicit consent

To use GA4 legally in the EU you need:

  1. A valid cookie consent banner with a genuine opt-out option (no dark patterns)
  2. A Data Processing Agreement with Google
  3. Google Consent Mode v2 implementation (signals to GA4 to model vs collect data for users who opt out)
  4. Standard Contractual Clauses for US data transfers (or rely on EU-US Data Privacy Framework if it holds)

For CCPA: GA4 requires a "Do Not Sell My Personal Information" mechanism if you're using Google Signals or sharing data with Google for advertising purposes. California residents can opt out of having their data sold to third parties — and Google's ad infrastructure is that third party.

Self-Hosted Plausible

Plausible's data model is fundamentally different:

  • No cookies: Plausible doesn't set any cookies or use localStorage for identification
  • No persistent identifiers: Plausible generates a daily rotating hash from IP + User-Agent + domain — this cannot be used to track users across days or sites
  • No IP storage: The raw IP is never stored; it's discarded after hash generation
  • No cross-site tracking: Data collection is scoped to your domain only
  • Data residency: On a self-hosted instance, all data stays on your server in your jurisdiction

In practice:

  • EU users: No cookie consent banner required under ePrivacy Directive in most EU member states (including Germany, France, and the Netherlands) because Plausible doesn't use cookies or collect personal data
  • GDPR Article 6: Plausible's data processing can be justified under legitimate interests since no personal data is collected — no data subject rights apply to anonymized aggregate data
  • CCPA: No sale of personal information because no personal information is collected in the first place

The compliance posture of self-hosted Plausible is structurally stronger than GA4 with Consent Mode v2 — not because of configuration choices but because of architecture.


Script Weight and Page Speed

The 45x Difference

ToolScript SizeLoad MethodCore Web Vitals Impact
Google Analytics 4~45KBAsyncModerate (TBT, LCP)
Google Tag Manager + GA480KB+AsyncHigh
Plausible~1KBDeferNegligible
Plausible (with extensions)2–3KBDeferNegligible

The GA4 script (gtag.js) is 45KB gzipped. Loaded with Google Tag Manager, total script weight exceeds 80KB. This contributes to Total Blocking Time on mobile connections and delays Time to Interactive.

Plausible's tracking script is under 1KB. The defer attribute means it loads after the page has rendered — zero impact on LCP or FID.

For a site with 100K monthly pageviews:

  • GA4 adds ~4.5GB of script downloads to your users per month
  • Plausible adds ~100MB

For a high-traffic site running Lighthouse audits or targeting a 90+ Performance score, this difference is measurable.


Docker Self-Hosting Setup

Deploy Plausible Community Edition

Plausible Community Edition (CE) is the self-hostable version. Since CE v2 (late 2023), it's maintained and actively developed. The main difference from Plausible Cloud: no revenue tracking via Stripe (unless configured), and multi-site management is done via environment variables.

Prerequisites:

  • A VPS with 1–2 GB RAM (DigitalOcean $6/mo Droplet, Hetzner CX22, etc.)
  • Docker and Docker Compose installed
  • A domain with DNS pointing to your server
  • An SMTP provider (Resend, Postmark, or your own)
# docker-compose.yml
services:
  plausible_db:
    image: postgres:16-alpine
    restart: always
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: postgres

  plausible_events_db:
    image: clickhouse/clickhouse-server:24.3.3.102-alpine
    restart: always
    volumes:
      - event-data:/var/lib/clickhouse
      - event-logs:/var/log/clickhouse-server
    ulimits:
      nofile:
        soft: 262144
        hard: 262144

  plausible:
    image: ghcr.io/plausible/community-edition:v2
    restart: always
    command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
    depends_on:
      - plausible_db
      - plausible_events_db
    ports:
      - 127.0.0.1:8000:8000
    env_file:
      - plausible-conf.env

volumes:
  db-data:
  event-data:
  event-logs:
# plausible-conf.env
BASE_URL=https://analytics.yourdomain.com
SECRET_KEY_BASE=your-64-char-generated-secret
TOTP_VAULT_KEY=your-32-char-generated-key

# Email (required for login links and reports)
MAILER_EMAIL=analytics@yourdomain.com
SMTP_HOST_ADDR=smtp.resend.com
SMTP_HOST_PORT=587
SMTP_USER_NAME=resend
SMTP_USER_PWD=re_your_api_key
SMTP_HOST_SSL_ENABLED=true

# Optional: Disable registration after initial setup
DISABLE_REGISTRATION=invite_only

# Optional: Google Search Console integration
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-secret

Generate the secrets:

# SECRET_KEY_BASE (64 chars)
openssl rand -base64 64 | tr -d '\n'

# TOTP_VAULT_KEY (32 chars)
openssl rand -base64 32 | tr -d '\n'

Start Plausible:

docker compose up -d

Reverse Proxy with Nginx

# /etc/nginx/sites-available/analytics
server {
    listen 80;
    server_name analytics.yourdomain.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    server_name analytics.yourdomain.com;

    ssl_certificate /etc/letsencrypt/live/analytics.yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/analytics.yourdomain.com/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto https;
    }
}
# SSL certificate via Certbot
certbot --nginx -d analytics.yourdomain.com

Resource Requirements

Traffic (pageviews/month)RAMCPUStorage
Up to 100K1 GB1 vCPU10 GB
100K–1M2 GB2 vCPU20 GB
1M–5M4 GB2 vCPU50 GB
5M–20M8 GB4 vCPU100 GB

ClickHouse is the storage-intensive component. It compresses analytics data efficiently but grows proportionally with event volume. At 1M pageviews/month, expect roughly 1–2GB of ClickHouse storage growth per month.

Backup Strategy

Back up both PostgreSQL (user accounts, site configs) and ClickHouse (event data) separately:

#!/bin/bash
# backup-plausible.sh
DATE=$(date +%Y%m%d-%H%M%S)
BACKUP_DIR="/var/backups/plausible/$DATE"
mkdir -p "$BACKUP_DIR"

# PostgreSQL dump (accounts, sites, goals)
docker exec plausible_db-1 pg_dump -U postgres plausible_db \
  > "$BACKUP_DIR/postgres-$DATE.sql"

# ClickHouse backup (event data)
docker exec plausible_events_db-1 clickhouse-backup create "plausible-$DATE"
docker exec plausible_events_db-1 clickhouse-backup upload "plausible-$DATE"

# Compress and optionally push to S3
tar -czf "$BACKUP_DIR.tar.gz" "$BACKUP_DIR"
aws s3 cp "$BACKUP_DIR.tar.gz" "s3://your-bucket/plausible-backups/"

Add to cron for daily backups:

0 2 * * * /opt/plausible/backup-plausible.sh >> /var/log/plausible-backup.log 2>&1

Adding the Tracking Script

Plausible

<!-- Basic: under 1KB, cookieless -->
<script defer data-domain="yourdomain.com"
  src="https://analytics.yourdomain.com/js/script.js"></script>

<!-- With outbound link tracking + file downloads -->
<script defer data-domain="yourdomain.com"
  src="https://analytics.yourdomain.com/js/script.outbound-links.file-downloads.js">
</script>

<!-- With custom events (enables plausible() function) -->
<script defer data-domain="yourdomain.com"
  src="https://analytics.yourdomain.com/js/script.tagged-events.js">
</script>

Google Analytics 4

<!-- GA4 via gtag.js (~45KB) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-XXXXXXXXXX', {
    // Required for GDPR: wait for consent before collecting
    'consent_default': {
      'analytics_storage': 'denied'
    }
  });
</script>

With Consent Mode v2, GA4 will model traffic for users who deny consent — but modeled data is an approximation, not a measurement.


Feature Comparison: Plausible vs GA4

Core Analytics

FeaturePlausibleGoogle Analytics 4
Pageviews
Unique visitors✅ (cookie-free)✅ (cookie-based)
Session tracking
Bounce rateEngagement rate (inverted)
Time on page
Real-time✅ (30 min delay)
Geographic dataCountry/region/cityCountry/region/city
Device breakdownOS/browser/device typeOS/browser/device/screen
Referrers / UTM
Direct vs organic

Conversion and Events

FeaturePlausibleGoogle Analytics 4
Custom events✅ (JS API)✅ (gtag events)
Goals / conversions✅ (requires config)
Revenue tracking✅ (Enhanced Ecommerce)
Funnel visualization✅ (paid: Plausible Cloud Business)✅ (Explore reports)
Ecommerce depthBasic revenueFull cart/product/category
Custom dimensions✅ (event properties)✅ (custom dimensions)
User properties

Plausible Custom Events

// Track signup conversion
window.plausible('Signup', { props: { plan: 'pro', source: 'pricing-page' } });

// Track revenue event
window.plausible('Purchase', {
  props: { plan: 'enterprise', billing: 'annual' },
  revenue: { currency: 'USD', amount: 299.00 }
});

// Track outbound click (auto-tracked with outbound-links script)
// Manual tracking:
window.plausible('Outbound Link: Click', { props: { url: 'https://github.com/plausible' } });

GA4 Custom Events

// Track signup conversion
gtag('event', 'sign_up', {
  method: 'email',
  plan: 'pro',
  source: 'pricing-page'
});

// Track purchase
gtag('event', 'purchase', {
  currency: 'USD',
  value: 299.00,
  transaction_id: 'T-12345',
  items: [{ item_name: 'Enterprise Plan', price: 299.00, quantity: 1 }]
});

Advanced Features

FeaturePlausibleGoogle Analytics 4
Google Search Console✅ Native integration✅ Native integration
Heatmaps❌ (requires Hotjar or GTM)
Session recordings❌ (requires Hotjar or GTM)
A/B testing✅ via Google Optimize (deprecated)
BigQuery export✅ (GA4 360 or free daily export)
Looker Studio✅ (native connector)
Audiences for ads✅ (Google Ads integration)
Attribution modelingLast-touch onlyMulti-touch (data-driven)
Predictive audiences✅ (purchase/churn probability)
Shared dashboards✅ (public URL)✅ (Looker Studio)
Email reports✅ Weekly/monthly✅ (via GA4 reporting)
REST API✅ (GA4 Data API)

Feature Gaps: What Plausible Doesn't Have

No Heatmaps or Session Recordings

GA4 alone doesn't have heatmaps either — but it integrates with Hotjar, Microsoft Clarity (free), and similar tools via GTM. Self-hosted Plausible has no equivalent. If you need click heatmaps or session recordings, you'll need to add a separate tool:

  • Microsoft Clarity (free) — session recordings and heatmaps with no pageview limits
  • Matomo with Heatmaps plugin — self-hosted option that covers both analytics and UX recording (see Matomo vs Plausible comparison)
  • OpenReplay — open source session recording, self-hostable

No Advanced Attribution

Plausible tracks last-touch attribution only — the referrer/UTM on the session that converted. GA4's data-driven attribution model uses machine learning to distribute conversion credit across touchpoints in the 30-day path to purchase.

For content sites and SaaS with simple acquisition (search, direct, one newsletter), last-touch is usually accurate enough. For paid ads with multi-channel journeys, GA4's attribution is meaningfully better.

No Google Ads Integration

GA4 integrates with Google Ads for audience remarketing, conversion import, and campaign optimization. Self-hosted Plausible has no Google Ads connector — it tracks that a campaign drove traffic but cannot feed conversion data back to Google for Smart Bidding.

If Google Ads performance is central to your acquisition strategy, GA4 (or at minimum GA4 alongside Plausible) is required.

No BigQuery Export

GA4 offers a free daily BigQuery export for up to 1M events/day. This unlocks SQL queries across raw event data — useful for data warehouses and custom attribution models. Plausible's API exposes aggregate data only.


Self-Hosted vs Cloud Cost Comparison

OptionAnnual CostNotes
Google Analytics 4$0"Free" — your data is the product
Google Analytics 360$150,000+Enterprise features, SLA
Plausible Cloud (10K pageviews)$108/year$9/month
Plausible Cloud (100K pageviews)$228/year$19/month
Plausible Cloud (1M pageviews)$588/year$49/month
Plausible self-hosted (100K pv)$72–120/year$6–10/month VPS
Plausible self-hosted (1M pv)$120–180/year$10–15/month VPS

Self-hosted Plausible has the lowest total cost of any full-featured analytics solution. The only costs are VPS hosting and the time to maintain it.

GA4's "free" pricing should be evaluated against:

  • Engineer hours spent configuring Consent Mode v2 and maintaining GDPR compliance
  • Legal review costs for cross-border data transfer documentation
  • Page speed penalty from 45KB script (potential SEO cost)
  • Consent banner implementation and optimization
  • Potential GDPR fines if data handling is found inadequate

Updating and Maintaining Self-Hosted Plausible

Updating to New Versions

Plausible Community Edition releases follow Plausible Cloud versions with a short lag. Check the GitHub releases page for CE-tagged releases.

# Pull new images
docker compose pull

# Apply database migrations and restart
docker compose down
docker compose up -d

# Verify version
docker compose exec plausible /app/bin/plausible version

Monitoring Uptime and Performance

Self-hosted Plausible doesn't have a built-in status page. Add basic uptime monitoring:

# Add Uptime Kuma to your docker-compose.yml for self-hosted monitoring
  uptime-kuma:
    image: louislam/uptime-kuma:1
    restart: always
    ports:
      - "127.0.0.1:3001:3001"
    volumes:
      - uptime-kuma-data:/app/data

Monitor these endpoints:

  • https://analytics.yourdomain.com/ — main dashboard (200 = healthy)
  • https://analytics.yourdomain.com/api/health — API health check

Disk Space Management

ClickHouse stores raw event data and compresses it aggressively, but high-traffic sites accumulate data quickly. Set a data retention policy:

# Check ClickHouse disk usage
docker exec plausible_events_db-1 clickhouse-client \
  --query "SELECT database, table, formatReadableSize(sum(bytes)) as size
           FROM system.parts WHERE active GROUP BY database, table
           ORDER BY sum(bytes) DESC"

Plausible CE supports data retention settings via environment variable — set DATA_RETENTION_DAYS=365 in your conf file to automatically purge events older than one year.

Scaling Beyond One Server

At 5M+ pageviews/month, single-server ClickHouse may become the bottleneck. Options:

  1. Vertical scaling: Upgrade the VPS — ClickHouse benefits significantly from more RAM (aim for event data to fit in memory)
  2. Separate ClickHouse server: Move ClickHouse to a dedicated instance with SSD storage, update CLICKHOUSE_DATABASE_URL in your Plausible config
  3. Plausible Cloud migration: At very high scale, Plausible Cloud's infrastructure may be more cost-effective than managing ClickHouse clusters — Plausible supports importing self-hosted data to Cloud

Migration Path: GA4 → Self-Hosted Plausible

Step 1: Export Historical Data from GA4

GA4 allows data export to BigQuery or via the GA4 Reporting API. For basic historical context, export your top pages, referrers, and conversion events.

Step 2: Deploy Plausible

Follow the Docker Compose setup above. Plausible will start collecting data as soon as the tracking script is live.

Step 3: Run Both in Parallel

Run GA4 and Plausible simultaneously for 2–4 weeks. Compare:

  • Total pageviews (Plausible typically reports higher because it catches users who block GA4)
  • Top pages and referrers
  • Conversion event counts

Plausible's numbers are often 10–30% higher than GA4 for the same site because ad blockers, privacy browsers, and Firefox's Enhanced Tracking Protection all block GA4 by default. Plausible is rarely blocked by mainstream ad blockers.

Step 4: Import GA4 Data (Optional)

Plausible supports importing historical Google Analytics data:

  1. In Plausible dashboard → Site Settings → Imports & Exports
  2. Connect your Google account
  3. Select the GA4 property and date range to import
  4. Plausible imports aggregate data (sessions, pageviews, referrers) for historical trend continuity

Step 5: Remove GA4

After confirming Plausible is capturing data correctly, remove the gtag.js script from your site and close the GA4 property if you no longer need it.


Decision Framework

Choose self-hosted Plausible if:

  • GDPR compliance without cookie banners is a hard requirement
  • Your team is in the EU or you're building for EU users
  • Page speed scores and Core Web Vitals matter for SEO
  • You want full data ownership with no third-party data sharing
  • Basic analytics (traffic, referrers, goals, funnels) covers your use case
  • Server administration is not a bottleneck — setup takes 30 minutes
  • Budget is limited — $6–10/month beats Plausible Cloud pricing at scale

Keep Google Analytics 4 if:

  • Google Ads Smart Bidding requires conversion feedback (audiences, ROAS optimization)
  • Multi-touch attribution across long customer journeys is required
  • BigQuery export for a data warehouse is part of the analytics architecture
  • You already have a working Consent Mode v2 implementation and compliance is handled
  • You need Looker Studio dashboards shared with non-technical stakeholders

Consider running both if:

  • You need GA4 for Google Ads but want privacy-safe analytics for internal reporting
  • You're in a transition period validating data quality before removing GA4
  • Different teams own different tools (growth team uses GA4, engineering uses Plausible)

Practical Setup: Blocking Bots and Spam Traffic

One maintenance task that matters for data quality: Plausible automatically blocks known bot User-Agents, but some spam traffic slips through. Use the built-in shield:

  1. In Plausible dashboard → Site Settings → Shields
  2. Add IP addresses or CIDR ranges to block (your office IP, CI/CD servers)
  3. Enable "Block traffic from localhost" to exclude development traffic

For datacenter bot traffic, Plausible CE automatically filters based on User-Agent. The commercial Plausible Cloud adds more aggressive bot filtering — self-hosted users see slightly more bot traffic in raw numbers but the overall impact on analytics quality is minimal.

If you need to exclude a deployment pipeline that triggers pageviews:

// Exclude traffic from specific conditions
// Set window.plausible_ignore = true before the script loads
<script>window.plausible_ignore = true</script>
<script defer data-domain="yourdomain.com"
  src="https://analytics.yourdomain.com/js/script.js"></script>

Or set a localStorage value in your browser to exclude your own visits permanently:

// In browser console — persists across sessions
localStorage.setItem('plausible_ignore', 'true')

If you're moving toward full self-hosted infrastructure, related comparisons worth reading:


Related: Matomo vs Plausible 2026 · Rybbit vs Plausible vs Umami 2026 · How to Migrate from Google Analytics to Plausible

Comments

The SaaS-to-Self-Hosted Migration Guide (Free PDF)

Step-by-step: infrastructure setup, data migration, backups, and security for 15+ common SaaS replacements. Used by 300+ developers.

Join 300+ self-hosters. Unsubscribe in one click.