PostHog is an all-in-one product analytics platform with session replay, feature flags, and experiments. Google Analytics 4 (GA4) is a free web and app analytics tool tightly integrated with Google Ads. If you need traditional traffic and conversion reporting, GA4 fits; if you want to understand product usage and experiment, PostHog covers more under one roof. This comparison breaks down what each tool is built for, feature limits, pricing, privacy, and when to run both.
The Short Answer
PostHog and Google Analytics 4 (GA4) solve related but not identical problems. GA4 gives site owners and marketers a free, mature tool for traffic analysis, conversion reporting, and Google Ads attribution. PostHog bundles product analytics, session replay, feature flags, A/B experiments, and error tracking under a single SDK, and you can self-host it. The choice comes down to whether you need a marketing-focused web analytics suite or a product analytics platform that replaces several point tools.
If your primary goal is to optimize Google Ads campaigns, track ecommerce funnels, and report on page metrics, GA4 fits out of the box. It has no limit on distinctly named events for web data streams, supports up to 30 key events and 100 audiences, and includes BigQuery export (daily export of up to 1M events, with unlimited streaming export) on a standard property. However, when a standard property becomes Large, its event-level data retention is automatically reduced to 2 months. GA4 360 raises those limits: 50 key events, 1B events per exploration query, and up to 50 months of retention, but requires a 360 contract.
PostHog’s free tier gives you 1M analytics events every month, plus 5K session replays, 1M feature flag requests, and 1,500 survey responses, with no credit card required. On the free plan, usage stops at the limits; on pay-as-you-go you pay only for usage above the free allowance, and you can set billing limits per product. Data retention is 1 year on the free plan and 2 years on pay-as-you-go. The built-in replays and experiments make it a one-stop shop for product teams, and self-hosting is available under an MIT license for teams that want to keep data on their own infrastructure.
In short: GA4 for the Google Ads-centric marketer, PostHog for the product team that wants analytics plus experimentation and replay, and both for organizations that want a full picture. If you’re evaluating Google Analytics alternatives, PostHog is one option that goes beyond standard web metrics.
What Each Tool Is Built For
Google built GA4 to replace Universal Analytics and to serve as the central measurement hub for its advertising ecosystem. It focuses on the customer journey across web and apps. Key features include traffic acquisition reports, conversion tracking with up to 30 key events, and links to Google Ads, Display & Video 360, Search Console, and BigQuery. GA4 does not include session recording, feature flags, or A/B experiments.
PostHog was built for product teams that want to understand how users actually interact with a product, not just how they arrived. Its Product analytics layer provides trends, funnels, paths, retention, stickiness, and lifecycle insights. On top of analytics, PostHog includes session replay (5K free recordings/month), feature flags with multi-variate targeting, A/B experiments, error tracking, user surveys, and a data warehouse. Autocapture captures pageviews, clicks, and form submissions for you, so you have data before you instrument. Having these products in one platform means you can move between analytics, replays and error tracking without switching tools.
In practice, GA4 suits marketing teams measuring campaign ROI and site content performance. PostHog suits product managers and engineers iterating on user experiences. The design difference is real: GA4 centers on acquisition and Google Ads, PostHog on product usage.
Short on time? Analytics Art can check this in your property for you.
Feature Comparison Table
The table below lines up the core feature sets.
| Feature | Google Analytics 4 | PostHog |
|---|---|---|
| Core analytics | Reports and explorations | Trends, funnels, path analysis, retention, stickiness, lifecycle |
| Session replay | Not available | Included; 5K recordings free/month |
| Feature flags | Not available | Included; 1M requests free/month |
| A/B testing | Not available (third-party needed) | Built-in experiments, billed with feature flags |
| Error tracking | Not available | Included; 100K exceptions free/month |
| Surveys | Not available | Included; 1,500 responses free/month |
| Event-scoped custom dims | 50 standard; 125 on 360 | No published cap; uses person and group properties |
| BigQuery / data warehouse export | Daily export up to 1M events (standard) and streaming export (unlimited on both standard and 360) | Data modeling and endpoints are billed with the data warehouse; destinations include 10K events + 1M rows free |
| Self-hosting | Not available | Available under MIT license (unsupported hobby deploy) |
| Data retention (event-level) | 2 or 14 months (standard); up to 50 months (360); Large and XL properties limited to 2 months | 1 year free; 2 years pay-as-you-go; up to 7 years with platform packages |
The table shows where each tool overlaps and where they diverge. GA4 stands out for Ads integration and BigQuery streaming; PostHog’s breadth eliminates the need for separate replay, flag, and survey tools. GA4’s standard custom dimensions are detailed in the custom dimensions in GA4 guide.
Pricing And Data Limits
Both tools have a free tier, but their ceilings and what “free” means differ.
GA4's standard property is free and has no limit on distinctly named events for web data streams. The catch: when a standard property becomes Large, its event-level data retention is automatically reduced to 2 months, and event-level data older than 2 months becomes inaccessible and is permanently deleted. Standard limits on custom dimensions (50 event-scoped), key events (30), and audiences (100) remain. For GA4 conversion rate work, those key-event caps matter. For higher limits (100 event parameters, 125 custom dimensions, 50 key events, 400 audiences, retention up to 50 months), you need Google Analytics 360, which is tied to a Google Marketing Platform organization. API quotas jump from 200K to 2M tokens/day.
PostHog’s free plan has no credit card requirement and the allowance resets every month. You get 1M analytics events, 5K session replays, 1M feature flag requests, 100K error tracking exceptions, and 1,500 survey responses. Usage stops at the free limits, and additional events are permanently dropped, so you cannot be charged by surprise. Pay-as-you-go charges for usage above the free allowance, gives you 6 projects instead of 1, raises data retention from 1 to 2 years, and lets you set billing limits per product. Platform packages (Boost, Scale, Enterprise) extend event retention to up to 3, 5 and 7 years respectively, and add features such as SSO, audit logs, and custom roles.
PostHog’s per-unit rates beyond the free tier are shown on its pricing page, and you can generate an AI estimate or add the tracking code and check projected usage after a few days. Google does not publish a per-event price for 360 in the sources used here, so ask Google or a reseller for a quote.
Privacy, Cookies And Self-Hosting
If data ownership, residency, or legal compliance is your top concern, the two tools take very different paths.
PostHog offers a self-hosted hobby deployment under an MIT license. It runs via Docker Compose on a Linux Ubuntu VM (equivalent to a Hetzner VM with 4 vCPU, 16 GB RAM and more than 30 GB storage) and uses your own infrastructure. The self-hosted version is unsupported: PostHog does not do tagged releases for it, does not provide paid support plans for it, and you manage deployments, scaling and upgrades yourself. PostHog Cloud, on the other hand, runs in EU and US regions, provides a self-serve DPA on any plan, and offers a BAA for HIPAA use on the Boost, Scale, or Enterprise packages (a signed BAA does not make your setup compliant on its own). PostHog says its project token (phc_) is fine to make public because it does not have access to your private data.
GA4 does not offer self-hosting. All data lives on Google’s infrastructure. You control retention (2 or 14 months for standard properties, with a reset-on-new-activity option) and you can use consent mode v2 to respect user choices. By default, Google signed-in data expires after 26 months. The key difference is that with self-hosted PostHog you can keep data on your own servers, while GA4 data lives on Google’s infrastructure. If you are in a regulated industry, get legal advice for your case.
When To Use Both
Running both GA4 and PostHog on the same site is not only possible, it’s a practical strategy for teams that span marketing and product.
Use GA4 as your acquisition and ad performance hub. It records traffic sources, campaign clicks, and ecommerce conversions, and it feeds audiences into Google Ads. GA4’s attribution reports and Google Ads data make it irreplaceable for paid marketing. Use PostHog alongside it to capture product usage details: session replays, feature flag exposure, A/B experiment results, and error traces. PostHog’s events give you the behavioural depth that GA4’s aggregated reports do not provide. Because both tools ingest events independently, you can install both on the same site.
You might start with GA4 and add PostHog the moment you need session replay or product analytics. Conversely, if you already run PostHog for product insight but miss ad attribution, keep GA4 for that slice. The combination gives you a full picture: how users arrive (GA4) and what they do once they are inside your product (PostHog). Both tools have limits worth monitoring: PostHog’s free plan permanently drops events above the limit, and GA4’s event-level retention shrinks to 2 months for Large properties.
Frequently Asked Questions
Is PostHog Free For Startups?
Yes. PostHog’s free tier gives you 1M analytics events, 5K session replays, 1M feature flag requests, and more every month, with no credit card required. On the free plan usage stops at the limits, so you are not charged by surprise.
Can I Self-Host PostHog To Keep Data On My Own Servers?
Yes. PostHog provides a Docker Compose hobby deployment under an MIT license. You run it on your own infrastructure, but it is unsupported by PostHog, you manage backups, upgrades, and scaling yourself. GA4 does not offer self-hosting.
How Does Data Retention Compare Between GA4 And PostHog?
GA4 standard properties retain event-level data for 2 or 14 months. PostHog free retains events for 1 year and pay-as-you-go for 2 years, and the Boost, Scale and Enterprise packages offer up to 3, 5 and 7 years. GA4 360 can extend retention up to 50 months.
Does PostHog Offer HIPAA-Compliant Analytics?
Yes, PostHog Cloud provides a Business Associate Agreement (BAA) for HIPAA-covered use on the Boost, Scale, or Enterprise package. PostHog's documentation states that Google Analytics is not HIPAA compliant and cannot be used where you collect personal health information. A BAA alone does not make a setup compliant, so get legal advice.
Can I Use PostHog For Session Replay Alongside GA4?
Yes. Both tools can run on the same pages. PostHog covers replays and product events, while GA4 continues to track traffic sources and conversions.
Does PostHog Integrate With Google Ads Like GA4?
GA4 has native links to Google Ads, Display & Video 360 and Search Console, and the PostHog material used for this comparison describes no equivalent Google Ads integration. If paid campaign reporting and audience sharing matter, keep GA4 running.
Related GA4 Guides
More in Comparisons or browse all GA4 guides.
Official Documentation Used
- PostHog pricing: Start free, scale when you need
- Product analytics: Docs: PostHog
- Self-host PostHog: Docs: PostHog
- Privacy compliance: Docs: PostHog
- [GA4] Google Analytics 360 (Google Analytics 4 Properties): Analytics Help
- Data retention: Analytics Help
- Analytics Tools & Solutions for Your Business: Google Analytics