qmetrics.net

Best Open-Source Alternatives to Google Analytics 4

Google Analytics 4 by Google is a commercial product. These open-source projects say they can replace it.

The most popular open-source alternative to Google Analytics 4 is PostHog, with 41.2k GitHub stars. Other open-source alternatives to Google Analytics 4 are Umami, Plausible, Matomo and Rybbit (7 more below). Most Google Analytics 4 alternatives here are Web & Product Analytics tools, some are Marketing & Customer Engagement. The first 2 say in their own README or website that they can replace Google Analytics 4 (the quote is shown under each one); the other 10 do the same job, shown with their own description.

Stars and activity updated 27 November 2026.

Sort:Most starsRecentA–Z

Matomo

Privacy-oriented web and app analytics platform

Matomo collects, visualizes, and analyzes traffic from websites and apps with emphasis on data ownership and privacy controls. You install it on your server or use Matomo Cloud.

★ 22.1k⟳ todayGPL-3.0
Open Source Alternative to:FathomFathom AnalyticsGoogle Analytics+4
“With over 1.4 million websites across 190 countries, Matomo is now the leading open-source, GDPR-compliant alternative to Google Analytics 4.”

Litlyx

Cookie-free self-hostable web analytics with AI dashboard

Litlyx is a web analytics product that tracks visits and custom events without cookies. You can use a hosted cloud account or run the dashboard yourself with Docker.

★ 1.7k⟳ 11 months agoApache-2.0
“A powerful alternative to Google Analytics 4, Posthog and Mixpanel.”

Also does the same job as Google Analytics 4

These projects don't call themselves a Google Analytics 4 alternative, but two independent checks of their own description found they do the same main job.

PostHog

Open-source product analytics and context layer for apps

PostHog ingests analytics, session replays, errors, logs, and related product data so teams and agents can query and act on it. It ships feature flags, experiments, surveys, and warehouse tooling in one platform.

★ 41.2k⟳ todayMIT · open core
Open Source Alternative to:AmplitudeFathom AnalyticsFullStory+7
“Product analytics: Autocapture or manually instrument event-based analytics to understand user behavior.”

Umami

Privacy-first open-source web and product analytics platform

Umami tracks acquisition, behavior, conversion, retention, and revenue in one dashboard without cookies. You can self-host it or use Umami Cloud.

★ 40.4k⟳ 4 days agoMIT
Open Source Alternative to:AmplitudeFathom AnalyticsGainsight PX+5
“Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.”

Plausible

Privacy-first lightweight open-source website analytics

Plausible Analytics collects aggregated, cookie-free website statistics with a simple dashboard. It is available as managed cloud hosting or a self-hosted Community Edition.

★ 30k⟳ yesterdayAGPL-3.0
“Plausible is a lightweight and open-source Google Analytics alternative. Your website data is 100% yours and the privacy of your visitors is respected.”

Rybbit

Cookieless open-source web and product analytics

Rybbit collects web and product analytics without cookies, offers session replay and funnel views, and can be used as a hosted service or on your own server.

★ 13.4k⟳ 6 days agoAGPL-3.0
“Rybbit is the modern open source and privacy friendly alternative to Google Analytics.”

OpenPanel

Open-source web and product analytics platform

OpenPanel tracks website and product usage with funnels, cohorts, session replay, and dashboards. It offers cookieless GDPR-oriented tracking, optional self-hosting, and SDKs for web and mobile.

★ 7.3k⟳ 2 days agoAGPL-3.0
“Openpanel is an open-source web and product analytics platform that combines the power of Mixpanel with the ease of Plausible and one of the best Google Analytics replacements.”

Countly

Privacy-first product analytics and customer engagement platform

Countly collects and analyzes product data from mobile, web, desktop, and connected apps. Organizations can run it on their own infrastructure for analytics, engagement, and compliance.

★ 5.9k⟳ todayAGPL-3.0 · open core
Open Source Alternative to:AmplitudeGainsight PXGoogle Analytics 4+3
“Countly is a privacy-first, AI-powered analytics and engagement platform for understanding and optimizing customer journeys across digital applications, from desktop and mobile to IoT and connected environments.”

Tianji

Combined web analytics, uptime, and server status

Tianji bundles website analytics, uptime monitoring, and server status reporting in one open-source application for lightweight operations insight.

★ 3.1k⟳ todayApache-2.0
“All-in-One Insight Hub. Tianji = Website Analytics + Uptime Monitor + Server Status”

OpenWebAnalytics

Self-hosted open-source web analytics server and tracker

Open Web Analytics collects traffic and behavior data from your sites through a JavaScript tracker and an OWA Server you install. It offers dashboards, APIs, and optional heatmaps and session recordings.

★ 2.7k⟳ 9 days agoGPL-2.0
“Open Web Analytics is an open source alternative to commercial web analytics tools such as Google Analytics.”

Aptabase

Privacy-first open-source analytics for mobile, desktop, and web

Aptabase collects minimal, session-oriented usage data for apps through many SDKs. It offers a managed cloud service or hosting on your own servers with a built-in dashboard

★ 1.9k⟳ 3 days agoAGPL-3.0
Open Source Alternative to:FirebaseGoogle AnalyticsGoogle Analytics 4+1
“Aptabase is an open-source alternative to Firebase/Google Analytics, specifically built for Mobile, Desktop and Web apps.”

Swetrix

Privacy-first open-source web analytics with monitoring built in

Swetrix offers cookieless, GDPR-oriented website analytics with traffic stats, funnels, and custom events. You can use hosted Swetrix Cloud or deploy the Community Edition yourself with Docker.

★ 1.2k⟳ yesterdayAGPL-3.0
Open Source Alternative to:Google AnalyticsGoogle Analytics 4
“Swetrix is a privacy-first, cookieless Google Analytics alternative with real-time analytics, no sampling, and built-in performance & error monitoring.”

Compare Google Analytics 4 alternatives

Questions about Google Analytics 4 alternatives

Is there an open-source alternative to Google Analytics 4?

Yes. 12 open-source projects can replace Google Analytics 4, for example PostHog, Umami and Plausible. 2 of them say so in their own documentation; the other 10 do the same job.

What is the best open-source alternative to Google Analytics 4?

PostHog (41.2k GitHub stars) is the most popular open-source alternative to Google Analytics 4 on GitHub. The best choice depends on your needs: compare them side by side, for example PostHog vs Umami.

Are the open-source alternatives to Google Analytics 4 free?

All of the 12 projects listed here are free to use under an open-source license, with no license fee: 4 permissive (such as MIT), 8 copyleft (such as AGPL-3.0). Running software on your own server still costs hosting and upkeep, and many projects also sell a hosted version.

Related commercial products

Google Analytics

Google

15 open-source alternatives

Google Drive

Google

11 open-source alternatives

Firebase

Google

10 open-source alternatives

Gemini

Google

10 open-source alternatives

Pirsch

Pirsch

9 open-source alternatives

Mixpanel

Mixpanel

8 open-source alternatives