Releases: Swetrix/swetrix
tracker-node@3.2.0
Changelog:
- Add a new query string (
qs) parameter totrackViewsandtrackmethods, that's being used to properly identify referrers if they're not set (to reduce the amount ofDirect / Noneyou can see in the traffic sources of the dashboard). Learn more.
tracker-js@4.2.0
Changelog:
- Add a new query string (
qs) parameter totrackViewsandtrackmethods, that's being used to properly identify referrers if they're not set (to reduce the amount ofDirect / Noneyou can see in the traffic sources of the dashboard). Learn more.
v5.1.1
🔧 Fixes
- fix: Profiles did not support custom event filters (if you applied a custom event filters and opened Profiles tab - it would always be empty, even if sessions of this profiles had this event)
- fix: User flow panel is always reporting "No data"
- fix: Dashboard - infinite reload on project pin/unpin
- fix: Reuse traffic chart tooltip styles across all other charts
- fix: Unresponsive custom metrics (in Segments view)
- fix: Broken funnels tooltip layout
- fix: Report 'Visitors' instead of 'Pageviews' for Pages / Hosts panels
v5.1.0
Warning
This release contains breaking changes that require migrations and changes to your configuration, please read these instructions carefully if you are upgrading from a previous version, otherwise your installation will not work properly.
🔥 Major updates
🙂 Minor changes
- Improve onboarding & empty projects pages - now you will see a block with detailed info & links on how to add tracking to your website
- Add top 1/3/5/10 dropdown to the custom events chart to reduce noise
- 'Today' period chart now includes the whole day till 23:00, not just the period from the start of the day until now
- Add more integrations guides with different platforms to the docs
- Relax custom event limitations - now you can track any string up to 256 chars (before this change custom events were limited to letters & numbers only)
- App is crashing when you go offline. As a temporary solution, instead of the scary crash page it now displays a "No internet connection" page
- Session pageflow > Mark live sessions as "Session in progress" for more clarity
- Increase account max password length to 72 chars
- Dark theme & UI components improvements
🔧 Fixes
- fix: ECONNREFUSED when trying to use Swetrix CE on localhost deployments
- fix: Changing period does not update sessions in the profile view
- fix: Sometimes ALL annotations were always visible when the 'Today' period is selected, even if they're outside of that timeframe
- fix: Session & Profile detals are not displaying locale, UTM, region & city data properly
- fix: Don't expose CAPTCHA secret key on public projects
- fix: When custom event filter is applied, sometimes you might see data like UTM metrics as
nullrows - fix: Filters > Page selector is extremely laggy if there are a lot of pages present
- chore: Update dependencies
Upgrading to Swetrix v5.1 (from v5.0.3)
Important
You will need to perform a database migration. Please make sure you read these instructions through to the end to make sure you've updated properly and to avoid losing any data.
1. Run database migration scripts
Warning
Please make sure you always back up your data! Especially before migrating, to prevent data loss if something goes wrong.
In order to upgrade to Swetrix v5.1.0, you will need to run database migrations scripts. But first, your compose.yaml file should be set to the latest Swetrix versions and they are already installed on your machine.
To perform the migrations, you need to run the following command in your selfhosting folder:
docker compose exec swetrix-api node migrations/clickhouse/selfhosted_2026_03_04_2fa.jsIf you don't see any Query ERROR messages written to your console, this indicates that the migrations went well and Swetrix v5.1.0 is ready to use.
After performing the migration, you can run docker compose restart and Swetrix should be good to go!
🎉 That's it, enjoy selfhosting Swetrix! Join our Discord community for more updates & discussions about Swetrix.
v5.0.3
🙂 Minor changes
- Reworked the onboarding flow - to make it more appealing and showcase Swetrix features
- Reworked the dark theme UI - it's now darker and more consistent across UI components
- Migrate to a new icon library (before that change we were using 3 separate icon sets, now it's just one)
- Updates to the map component in the analytics dashboard - add
+/-buttons for easier zoom, rework full screen navigation - Simplify user settings page
🔧 Fixes
- Fullscreen map view was not closable for mobile device users
v5.0.2
v5.0.1
v5.0.0
Warning
This release contains breaking changes that require migrations and changes to your configuration, please read these instructions carefully if you are upgrading from a previous version, otherwise your installation will not work properly.
🔥 Major updates
UI Redesign
We’ve given Swetrix a fresh, more scalable interface built for easier navigation.
- Analytics dashboard: navigation has moved to vertical tabs, making it easier to add and access more reports without cramming the top bar.
- Projects dashboard: now cleaner and less cluttered, with built-in traffic charts so you can instantly understand how each project is performing at a glance.
- Polish across the app: we’ve refined a lot of the smaller UI details - tables, buttons, dropdowns, spacing, and general layout to make everyday use feel smoother and more consistent.
Profiles
You can now analyse long-term user behaviour and link distinct sessions to anonymous user profiles. This allows for much more accurate retention analysis and user journey mapping, and are extremely useful for calculating accurate MAU metric.
We built this with a privacy-first architecture. We do not use cookies, and we do not store raw IP addresses for profile tracking. Instead, we use a combination of non-identifiable signals (like user agent) and a salt to generate a completely irreversible identifier (a similar mechanism to how we track sessions, but with a different, longer living salt).
For those who need even more precision (and have user consent), we've added the ability to pass your own custom User IDs from the tracking script, giving you the most accurate analysis possible for logged-in users.
Goals
You can now define your own conversion goals to measure how many visitors complete specific actions on your website - like a sale, visiting a specific page or triggering a specific custom event.
Goals report you the exposure of your total traffic to the events you defined in them (conversions) - in a simple dashboard.
Feature Flags
Feature flags allow you to toggle features on and off for your users without deploying new code. This is useful for rolling out new features gradually, testing in production, or quickly disabling a feature if something goes wrong.
Learn more about feature flags.
CAPTCHA
This release also includes a selfhostable version of our CAPTCHA solution.
Swetrix Captcha is a privacy-first alternative to Google reCaptcha. Unlike traditional CAPTCHAs that require users to identify objects in images or solve puzzles, Swetrix CAPTCHA uses a Proof of Work (PoW) mechanism.
In order to solve Swetrix Captcha a user's comuter needs to perform a cryptographic calculation (Proof of Work) in the background. This requires a small amount of computational power from the user's device, which is trivial for a legitimate user but computationally expensive for bots trying to spam at scale.
Learn more about Swetrix Captcha.
Screen.Recording.2026-01-26.at.22.46.40.mov
🙂 Minor changes
- You can now pin / unpin projects in your dashboard.
- Added an optinal
Website URLsetting to your project settings. If you add it, it will activate tiny but nice features like links to your website pages in the Pages panel or session pageflow, as well as display your website's favicon in your analytics dashboard. - Reworked custom events UI in your analytics dashboard. On the traffic tab you will now see your custom events table, as well as a chart to see when these events were fired. Below these components you will also see reworked custom events & pageviews metadata tables to easier navigate them.
- Swetrix is now fully using server-side rendering - it's a much more stable and reliable product now.
- Added sorting options for your projects in the dashboard view, as well as a time period selector for the aggregated data view.
- Performance optimisations for analytics data inngest (same Swetrix instance can now handle more incoming events).
- For folks who use OIDC auth: you can now set
OIDC_PROMPTvariable, default value isselect_account. - We enabled compression for analytical data in Clickhouse - it should result in savings to your storage.
- (applicable to advanced users) You can now configure what header you want to use to get the IP address for incoming analytics requests. By default, we attempt to get request IP address from
x-forwarded-for, but you can set it to any custom value by changing theCLIENT_IP_HEADERvariable, to something likecf-connecting-ip,x-real-ip, etc. Consequently, theCLOUDFLARE_PROXY_ENABLEDvariable is not removed.
🔧 Fixes
- fix: some users saw login page flasing for a few milliseconds when they opened the app (#462)
- fix: reduce the size of the bundle by removing unnecessary libraries (#448)
Upgrading to Swetrix v5 (from v4.1.0)
Important
You will need to perform a database migration. Please make sure you read these instructions through to the end to make sure you've updated properly and to avoid losing any data.
First, you need to stop Swetrix CE: docker compose down
1. Update your compose.yaml file & configuration
Warning
We've changed the way requests are routed to the API. Now instead of 2 different services (web & backend) being exposed to the internet, we only expose one - web, and route the requests to the API through it with nginx. Please make sure you apply the changes below to your config for Swetrix CE v5 to work!
1) Create an nginx/config file in your selfhosting folder root
You may either do a git pull to pull the latest changes, or just manually copy it / replace existing one with a new one from our selfhosting repository.
2) Add a new nginx service to your compose.yaml
Make sure that your compose.yaml now contains the following service
nginx-proxy:
image: nginx:1.29.4-alpine
restart: always
depends_on:
swetrix:
condition: service_healthy
swetrix-api:
condition: service_healthy
links:
- "swetrix-api"
- "swetrix"
ports:
- "80:80"
volumes:
- ./nginx/config:/etc/nginx/conf.d/default.conf
3) Remove unused variables & properties
Make sure that the following variables are updated in your compose.yaml file
Changes to the swetrix service:
Replace image: swetrix/swetrix-fe:v4.1.0 with image: swetrix/swetrix-fe:v5.0.1
Remove:
ports:
- "80:3000"
In environment, replace API_URL=${API_URL} with BASE_URL=${BASE_URL}
Changes to the swetrix-api service:
Replace image: swetrix/swetrix-api:v4.1.0 with image: swetrix/swetrix-api:v5.0.1
Remove:
ports:
- "8080:5005"
Remove the - CLOUDFLARE_PROXY_ENABLED environment variable
For reference, see our current live compose.yaml file here.
4) Update your .env file
Add a BASE_URL variable with a URL where you host your Swetrix instance.
2. Start your docker container
Run the docker compose up -d command. This will pull up the Swetrix CE v5 release.
If you open your dashboard now, it will not work. This is expected as you still need to do a data migration to synchronise the new code with the database tables.
3. Run database migration scripts
Warning
Please make sure you always back up your data! Especially before migrating, to prevent data loss if something goes wrong.
In order to upgrade to Swetrix v5, you will need to run database migrations scripts. But first, your compose.yaml file should be set to the latest Swetrix versions and they are already installed on your machine.
To perform the migrations, you need to run the following commands in your selfhosting folder:
docker compose exec swetrix-api node migrations/clickhouse/selfhosted_2025_12_07_goals.js
docker compose exec swetrix-api node migrations/clickhouse/selfhosted_2025_12_10_feature_flags.js
docker compose exec swetrix-api node migrations/clickhouse/selfhosted_2025_12_14_data_compression.js
docker compose exec swetrix-api node migration...v4.1.0
Warning
This release contains breaking changes that require migrations, so please read these instructions carefully if you are upgrading from a previous version, otherwise your installation will not work properly.
What changed:
🔥 Major updates
- Referrer grouping - now in the Traffic sources you will see links grouped by it's top level domain. For example, if you have many different referrers from different Reddit posts, you'll see all of them grouped by Reddit name. If you click on a top level domain - you'll see a list of all the links from this domain. Learn more.
- Annotations - You can now mark important events on your charts to remember why traffic patterns changed. Learn more.
- Added traffic exclusion by country. Learn more.
🙂 Minor changes
- New filters experience - search filters modal now allows you to filter by contains / not contains, and overall it's much easier to apply filters using this view.
- Add autorefresh (every 30 seconds) functionality to analytics dashboard.
- Show/hide toggle on password input fields.
- A few other UI improvements around the app.
🔧 Fixes
- Filter for Pages leads to crash (bug report from our Discord channel)
Upgrading to Swetrix v4.1.0 (from v4.0.6)
Important
You will need to perform a database migration. Please make sure you read these instructions through to the end to make sure you've updated properly and to avoid losing any data.
1. Run database migration scripts
Warning
Please make sure you always back up your data! Especially before migrating, to prevent data loss if something goes wrong.
In order to upgrade to Swetrix v4.1.0, you will need to run database migrations scripts. But first, your compose.yaml file should be set to the latest Swetrix versions and they are already installed on your machine.
To perform the migrations, you need to run the following commands in your selfhosting folder:
docker compose exec swetrix-api node migrations/clickhouse/selfhosted_2025_11_29.js
docker compose exec swetrix-api node migrations/clickhouse/selfhosted_2025_11_30.jsIf you don't see any Query ERROR messages written to your console, this indicates that the migrations went well and Swetrix v4.1.0 is ready to use.
After performing the migration, you can run docker compose restart and Swetrix should be good to go!
🎉 That's it, enjoy selfhosting Swetrix! Let us know if you find any bugs or have any feedback for us and join our Discord.
Our work would not be possible without your support, and we hope you will love this release!
v4.0.6
What's Changed
🔧 Fixes
- Fix: "Check if password is leaked" did not work
- Fix: Pageview properties (metadata) panel only displays 1 key
- Fix: Auth redirects issues (if you go to a project settings page, for example, it would redirect you to /login, and then to /dashboard); now the auth redirects are handled correctly and do not redirect when it's not needed
🔸 Misc
- Refactored and simplified authentication
- Improve metadata table usability