coming soon …
Quick comparison per feature and aspect:
Aspect | GA4 | Umami self-hosted | Plausible self-hosted |
---|---|---|---|
Web, Summary dashboard | ✅ | ✅ | ✅ |
Web, Filters for viewed data | ✅ | ✅ | ✅ |
Web, Pre-built reports | ✅ | ✅ | ✅ |
Web, Custom reports builder | ✅ | ✅ | ❌ |
Web, UX | Simple when using pre-built reports, complicated for advanced usage. | Very good for both pre-built and custom reporting. | Very primitive, lacking. |
Web, Data export | Export to Google Sheets, CSV and TSV | Only copy-paste from custom reports (kinda like TSV) | Export to CSV (but only for summary dashboard) |
Stats API | ❌ | ✅ | ❌ Not available when self-hosting |
Direct SQL query | ✅ Only when exporting to BigQuery | ✅ | ❌ Unusable and hashed data |
Initial setup | A lot of steps, somewhat frustrating | Very straight-forward | Very straight-forward |
Impact on page load speed | Approx 500ms slow down | 2 KB script, almost no effect | 3 KB script, almost no effect |
Pricing | Free if not using BigQuery export | approx. $2 when self-hosting on Railway | approx. $8 when self-hosting on Railway |
Data quality and availability | Poor, only a small portion of website traffic data is available | Best quality and metrics availability | Not all metrics are being reported, but data quality is high |
If you have a website, you might want to collect data about how users interact with it:
- what pages do they visit?
- what pages are the most engaging?
- what actions are they performing?
For that we usually use web analytics tools. In this post I am comparing 3 tools after 30 days of using them:
- Google Analytics 4 (GA4)
- Umami
- Plausible
Google Analytics 4 is free and became a default choise for many websites.
Notes:
- I tried using Matomo Analytics, but it just didn’t work — installation script was not being detected by Matomo itself, so it will not be a part of this comparison
- Although PostHog is open-source and theoretically can be self-hosted, I couldn’t do it (probably a skill issue)
As mentioned, Google Analytics if completely free. I recommend setting it up using Google Tag Manager (GTM), since you will still need GTM for creating custom events in the future.
Since I am self-hosting both of these tools, I don’t pay a subscription fee, but I do pay for hosting them on Railway. Setup for both of these tools is very similar:
- Deploy service via template
- Create admin account and get installation script
- Add installation script in the
<head>
of pages that you want to track
When it comes to pricing when self-hosting, they differ significantly:
Bill from railway.app for self-hosting Umami and Plausible for 30 days
- Umami
- Self-hosted on Railway: $1.24
- Official Hobby plan: $0
- Official Pro plan: $20
- Plausible
- Self-hosted on Railway: $7.66
- Official Growth plan: $9
- Official Business plan: $19
This difference when self-hosting is caused by RAM usage of each service:
- Umami RAM usage
- Umami service: 250 MB
- postgres: 80 MB
- Plausible RAM usage
- Plausible service: 450 MB
- Clickhouse service: 400 MB
- postgres: 100 MB
If you want to track custom events, like submitting a form, adding product to cart or completing a purchase — you will need to do some extra work.
- write dataLayer.push script (ex. for button onClick)
- create tag in GTM
- create trigger in GTM
- create dataLayer variable (DLV) for each event property in GTM
- pass event prop and value from DLV into created GTM tag
- publish new version of GTM container
- wait for GA4 to propagate new event props (approx. 24h)
- add custom definitions to GA4 for each event prop
- only now data is being collected
So you you are planning to heavily use custom events in GA4 — prepare yourself for quite the adventure.
umami.track()
function that can be used to track custom events and properties.Here’s the example usage of this tracker function in a React component:
export const UmamiTrackedButton = () => {
const eventData = {
value: "99",
currency: "USD",
product_id: "abcd",
};
const handleClick = () => {
umami.track("purchase", eventData);
};
return <button onClick={handleClick}>Track</button>;
};
Once this button is clicked, the event data will immidiately show in Umami’s dashboard. No extra steps are required.
umami.identify()
function that can be used to easily identify sessions of the same user from different devices, which is very useful. I consider it a gamechanger fore cross-device and cross-session traffic analytics.Initial steps for tracking custom events with Plausible are quite similar to Umami:
export const PlausibleTrackedButton = () => {
const eventData = {
value: "99",
currency: "USD",
product_id: "abcd",
};
const handleClick = () => {
plausible("purchase", {
props: eventData,
});
};
return <button onClick={handleClick}>Track</button>;
};
Screenshot: Plausible > Site settings > Custom properties
This extra step might not be a dealbreaker, but you might spend some time on adding each property during initial setup.
Also, there’s always a chance that you will just forget to do it after adding custom events and remember only when accessing the data, which might be very frustrating.
Once the data is collected, you would want to access it.
Usually, there are two methods of accessing such data:
- via web interface
- programmatically, using API or SQL queries
All 3 tools have a web interface for viewing data, but the experience and features are very different.
For programmatic data access, some extra steps are required.
The only way to access raw data is by configuring export to BigQuery, which is a Google Cloud serverless data storage. It allows you to:
- query data using SQL
- save and organize queries
This is a paid feature, since you will be using BigQuery on Google Cloud. Unfortunately, I don’t have specific numbers on how much it can cost.
prisma.schema
file in the official repo.Plausible stats API doesn’t work when self-hosting, it’s only for cloud users.
This is the most important part of the comparison. If the data is unusable — why would you even consider the tool?
When analyzing website traffic, I am interested in the following metrics:
- page views
- sessions (also called visits)
- unique visitors (also called users)
- session duration
- bounce rate
It also makes sense to put these metrics in a specific context, for example:
- entire website traffic
- per page
- per referrer
- per location
- per device type
Here are some reports that let us compare all 3 analytics tools.
Metric | GA4 | Umami | Plausible |
---|---|---|---|
page views | 162 | 398 | 392 |
visits (sessions) | 186 | 337 | 341 |
unique visitors (users) | 103 | 270 | 306 |
session duration in seconds | 156 | 78 | 91 |
bounce rate | 60% | 88% | 81% |
Page path | GA4 | Umami | Plausible |
---|---|---|---|
/ | 12 | 24 | 23 |
/blog | 2 | 5 | 5 |
/blog/hello-world | 1 | 3 | 2 |
/blog/how-to-add-google-tag-manager-to-nextjs | 42 | 94 | 94 |
/blog/how-to-deploy-nextjs-to-firebase-hosting | 65 | 177 | 174 |
/blog/naming-convention-for-digital-marketing-campaigns | 2 | 2 | 2 |
/blog/nextjs-self-host-google-cloud-vm | 36 | 87 | 88 |
/contact | 2 | 4 | 4 |
Referrer | GA4 | Umami | Plausible |
---|---|---|---|
direct | 15 | 109 | - |
12 | 29 | - | |
33 | 80 | - | |
6 | 4 | - | |
youtube | 90 | 152 | - |
Country | GA4 | Umami | Plausible |
---|---|---|---|
Brazil | 10 | 21 | 17 |
Canada | 11 | 7 | 5 |
France | 4 | 7 | 6 |
Germany | 1 | 6 | 4 |
India | 22 | 40 | 37 |
Indonesia | 6 | 7 | 7 |
Pakistan | 4 | 8 | 8 |
Philippines | 7 | 11 | 10 |
Thailand | 13 | 20 | 19 |
United Arab Emirates | 2 | 5 | 4 |
United Kingdom | 4 | 14 | 13 |
United States | 38 | 51 | 45 |
Device type | GA4 | Umami | Plausible |
---|---|---|---|
desktop | 89 | 242 | 278 |
mobile | 17 | 20 | 26 |
tablet | 0 | 7 | 2 |
When comparing metrics that are available in all 3 tools, it’s clear that Umami and Plausible are reporting similar data.
Google Analytics seems to be sampling and/or not making all the data available.
Plausible does not have all the metrics for most of the crucial reports.
reddit / referral
AND reddit.com / referral
are two different referrers in Google Analytics.umami.identify()
function is a gamechanger for:- measuring data per user ross many user sessions and devices
- connecting web analytics data with data from your database!
Some of these tools enable server-side tracking, but in different ways.
You need to create Google Tag Manager Server Container and configure it. You might need help from experienced web analytics specialist to properly configure it.
- "You can't send geographic or device information using the Measurement Protocol."
- "While it's possible to send events to Google Analytics solely with the Measurement Protocol, only partial reporting may be available."
POST
request to a route with event’s data in body
.As far as I know, Plausible has no way of sending data server-side.
This is not a sponsored article and I wrote it simply out of my frustration when using Google Analytics for many of my or my client’s websites.