Skip to content

πŸ“ˆ Open source, privacy-first web analytics β€” a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Update docs links

Blue Mousec0820917e60b
diff --git a/README.md b/README.md
index 29362db26..5d69b3805 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
<br />
<a href="https://swetrix.com">Website</a>
Β·
- <a href="https://docs.swetrix.com">Docs</a>
+ <a href="https://swetrix.com/docs">Docs</a>
Β·
<a href="https://github.com/Swetrix/swetrix/issues">Issues</a>
Β·
@@ -27,7 +27,7 @@
<p align="center">
<a href="https://swetrix.com"><img src="https://img.shields.io/badge/Try%20Swetrix%20Cloud-free%20trial-1d4ed8" alt="Try Swetrix Cloud"></a>
- <a href="https://docs.swetrix.com/selfhosting/how-to"><img src="https://img.shields.io/badge/Self--host-with%20Docker-555" alt="Self-host with Docker"></a>
+ <a href="https://swetrix.com/docs/selfhosting/how-to"><img src="https://img.shields.io/badge/Self--host-with%20Docker-555" alt="Self-host with Docker"></a>
<a href="https://github.com/Swetrix/swetrix/stargazers"><img src="https://img.shields.io/github/stars/Swetrix/swetrix?style=flat&label=Stars" alt="GitHub stars"></a>
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-AGPLv3-green" alt="License"></a>
</p>
@@ -45,7 +45,7 @@ It goes beyond pageviews: alongside traffic stats you get **error tracking**, **
Open source since 2021, bootstrapped, and funded entirely by our subscribers. Made in the πŸ‡¬πŸ‡§ UK, hosted on Hetzner in πŸ‡©πŸ‡ͺ Germany.
-πŸ‘‰ **[Try it free on Swetrix Cloud](https://swetrix.com)** or **[self-host with Docker](https://docs.swetrix.com/selfhosting/how-to)**.
+πŸ‘‰ **[Try it free on Swetrix Cloud](https://swetrix.com)** or **[self-host with Docker](https://swetrix.com/docs/selfhosting/how-to)**.
## ✨ Features
@@ -60,7 +60,7 @@ Open source since 2021, bootstrapped, and funded entirely by our subscribers. Ma
- **Error tracking** β€” capture client-side errors with details and aggregated views.
- **Session replays** *(Cloud)* β€” replay sessions to see exactly where visitors get stuck.
- **Sharing & teams** β€” public or password-protected dashboards; invite teammates with roles, or manage access with organisations.
-- **Data portability** β€” export to CSV and access everything via the [developer API](https://docs.swetrix.com/statistics-api).
+- **Data portability** β€” export to CSV and access everything via the [developer API](https://swetrix.com/docs/statistics-api).
- **More** β€” alerts & notifications, feature flags, A/B experiments, revenue analytics and Ask AI *(Cloud)*.
## Swetrix vs Google Analytics vs Plausible
@@ -93,7 +93,7 @@ We handle hosting, maintenance, backups and a worldwide CDN β€” you keep full ow
- **[Start free β†’](https://swetrix.com)** β€” free trial, then from $19/mo
- **[Live demo β†’](https://swetrix.com/demo)**
-- **[Docs β†’](https://docs.swetrix.com)**
+- **[Docs β†’](https://swetrix.com/docs)**
Your subscription directly funds maintenance and development of the open-source project.
@@ -101,7 +101,7 @@ Your subscription directly funds maintenance and development of the open-source
Prefer to run it yourself? Swetrix Community Edition (CE) ships the same core analytics: privacy-friendly traffic stats, custom events, sessions, funnels, performance and error tracking. Deploy the API and UI with Docker, connect MySQL / ClickHouse / Redis, and you're live.
-- **[Self-hosting guide β†’](https://docs.swetrix.com/selfhosting/how-to)**
+- **[Self-hosting guide β†’](https://swetrix.com/docs/selfhosting/how-to)**
#### Cloud vs Community Edition
diff --git a/backend/apps/cloud/src/analytics/analytics.service.ts b/backend/apps/cloud/src/analytics/analytics.service.ts
index fa635913f..5bd9c0726 100644
--- a/backend/apps/cloud/src/analytics/analytics.service.ts
+++ b/backend/apps/cloud/src/analytics/analytics.service.ts
@@ -2501,7 +2501,7 @@ export class AnalyticsService {
const echoed = String(userSupplied ?? '').slice(0, 64)
throw new BadRequestException(
- `"${echoed}" is not a valid profileId. Pass a unique, stable identifier of the user (e.g. an internal user ID) of up to ${MAX_USER_PROFILE_ID_LENGTH} characters, see https://docs.swetrix.com/visitor-identification`,
+ `"${echoed}" is not a valid profileId. Pass a unique, stable identifier of the user (e.g. an internal user ID) of up to ${MAX_USER_PROFILE_ID_LENGTH} characters, see https://swetrix.com/docs/visitor-identification`,
)
}
diff --git a/backend/apps/community/src/analytics/analytics.service.ts b/backend/apps/community/src/analytics/analytics.service.ts
index 464158f30..b60aaab50 100644
--- a/backend/apps/community/src/analytics/analytics.service.ts
+++ b/backend/apps/community/src/analytics/analytics.service.ts
@@ -2142,7 +2142,7 @@ export class AnalyticsService {
const echoed = String(userSupplied ?? '').slice(0, 64)
throw new BadRequestException(
- `"${echoed}" is not a valid profileId. Pass a unique, stable identifier of the user (e.g. an internal user ID) of up to ${MAX_USER_PROFILE_ID_LENGTH} characters, see https://docs.swetrix.com/visitor-identification`,
+ `"${echoed}" is not a valid profileId. Pass a unique, stable identifier of the user (e.g. an internal user ID) of up to ${MAX_USER_PROFILE_ID_LENGTH} characters, see https://swetrix.com/docs/visitor-identification`,
)
}
diff --git a/packages/captcha-validator/README.md b/packages/captcha-validator/README.md
index cea4b3c63..2bd84daf2 100644
--- a/packages/captcha-validator/README.md
+++ b/packages/captcha-validator/README.md
@@ -3,7 +3,7 @@
# Swetrix CAPTCHA validator
This is a wrapper for the Swetrix CAPTCHA server-side validation API.\
It is used to validate the user's response to the CAPTCHA.\
-Read more about server-side validation at https://docs.swetrix.com/captcha/server-side-validation
+Read more about server-side validation at https://swetrix.com/docs/captcha/server-side-validation
# Installation
```bash
diff --git a/packages/captcha/README.md b/packages/captcha/README.md
index b8b2ee6d0..66ad70dd2 100644
--- a/packages/captcha/README.md
+++ b/packages/captcha/README.md
@@ -8,7 +8,7 @@
Swetrix CAPTCHA is a privacy-oriented, simple and opensource CAPTCHA service.
-See the full documentation at https://docs.swetrix.com/captcha/introduction
+See the full documentation at https://swetrix.com/docs/captcha/introduction
## Features
@@ -84,7 +84,7 @@ To build the captcha run:
npm run build
```
-After you build it, a new folder `dist` will appear. You can run `test.html` file via an extension like `Live server` to test it (don't forget to set up a valid project ID or one of our [dummy project IDs](https://docs.swetrix.com/captcha/testing)).
+After you build it, a new folder `dist` will appear. You can run `test.html` file via an extension like `Live server` to test it (don't forget to set up a valid project ID or one of our [dummy project IDs](https://swetrix.com/docs/captcha/testing)).
## License
diff --git a/packages/tracker-js/README.md b/packages/tracker-js/README.md
index cfaf4b253..971ff5a83 100644
--- a/packages/tracker-js/README.md
+++ b/packages/tracker-js/README.md
@@ -306,7 +306,7 @@ init('YOUR_PROJECT_ID', {
## Documentation
-Full reference and guides are available at [docs.swetrix.com](https://docs.swetrix.com).
+Full reference and guides are available at [docs.swetrix.com](https://swetrix.com/docs).
## Contributing
diff --git a/packages/tracker-js/package.json b/packages/tracker-js/package.json
index f39693026..8c38dfc35 100644
--- a/packages/tracker-js/package.json
+++ b/packages/tracker-js/package.json
@@ -9,7 +9,7 @@
"privacy",
"swetrix"
],
- "homepage": "https://docs.swetrix.com",
+ "homepage": "https://swetrix.com/docs",
"bugs": {
"url": "https://github.com/Swetrix/swetrix/issues"
},
diff --git a/packages/tracker-node/README.md b/packages/tracker-node/README.md
index 4fb6d6642..8d47ec742 100644
--- a/packages/tracker-node/README.md
+++ b/packages/tracker-node/README.md
@@ -78,7 +78,7 @@ swetrix.trackPageView(ip, userAgent, { pg: '/home' })
## Tracking pageviews
**To track pageviews, custom events and heartbeat events you have to pass your website visitors IP address and user agent, otherwise functionality like unique visitors or live visitors tracking will not work!**\
-You can read about it in details on our [Events API](https://docs.swetrix.com/events-api#unique-visitors-tracking) documentation page.
+You can read about it in details on our [Events API](https://swetrix.com/docs/events-api#unique-visitors-tracking) documentation page.
Tracking pageviews can be done by calling the following function:
diff --git a/packages/tracker-node/package.json b/packages/tracker-node/package.json
index 290e9d1af..470354419 100644
--- a/packages/tracker-node/package.json
+++ b/packages/tracker-node/package.json
@@ -9,7 +9,7 @@
"privacy",
"swetrix"
],
- "homepage": "https://docs.swetrix.com",
+ "homepage": "https://swetrix.com/docs",
"bugs": {
"url": "https://github.com/Swetrix/swetrix/issues"
},
diff --git a/packages/tracker-node/src/index.ts b/packages/tracker-node/src/index.ts
index 30ead6f14..244cc4bbe 100644
--- a/packages/tracker-node/src/index.ts
+++ b/packages/tracker-node/src/index.ts
@@ -244,7 +244,7 @@ export class Swetrix {
}
/**
- * This function is used to send custom events (implements https://docs.swetrix.com/events-api#post-logcustom).
+ * This function is used to send custom events (implements https://swetrix.com/docs/events-api#post-logcustom).
*
* @param ip IP address of the visitor
* @param userAgent User agent of the visitor
@@ -265,7 +265,7 @@ export class Swetrix {
}
/**
- * This function is used to send pageview events (implements https://docs.swetrix.com/events-api#post-log).
+ * This function is used to send pageview events (implements https://swetrix.com/docs/events-api#post-log).
*
* @param ip IP address of the visitor
* @param userAgent User agent of the visitor
@@ -280,7 +280,7 @@ export class Swetrix {
const data = {
pid: this.projectID,
profileId: pageview?.profileId ?? this.options?.profileId,
- ...(pageview || {}),
+ ...pageview,
}
await this.sendRequest('', ip, userAgent, data)
@@ -302,14 +302,14 @@ export class Swetrix {
const data = {
pid: this.projectID,
- ...(error || {}),
+ ...error,
}
await this.sendRequest('error', ip, userAgent, data)
}
/**
- * This function is used to send heartbeat events (implements https://docs.swetrix.com/events-api#post-loghb).
+ * This function is used to send heartbeat events (implements https://swetrix.com/docs/events-api#post-loghb).
* Heartbeat events are used to determine if the user session is still active.
* This allows you to see the 'Live Visitors' counter in the Dashboard panel.
* It's recommended to send heartbeat events every 30 seconds.
@@ -565,7 +565,7 @@ export class Swetrix {
/**
* Identify a visitor with your own user ID (e.g. after they log in),
- * implements https://docs.swetrix.com/events-api#post-logidentify.
+ * implements https://swetrix.com/docs/events-api#post-logidentify.
*
* The visitor's current anonymous profile (derived from their IP and user
* agent) gets linked to the identified profile server-side, so their
diff --git a/web/app/pages/Project/Settings/ProjectSettings.tsx b/web/app/pages/Project/Settings/ProjectSettings.tsx
index 55842bd23..0be1a7ac5 100644
--- a/web/app/pages/Project/Settings/ProjectSettings.tsx
+++ b/web/app/pages/Project/Settings/ProjectSettings.tsx
@@ -1221,7 +1221,7 @@ const ProjectSettings = () => {
),
url: (
<a
- href='https://docs.swetrix.com/selfhosting/google-search-console'
+ href='https://swetrix.com/docs/selfhosting/google-search-console'
aria-label={t(
'ariaLabels.openGoogleSearchConsoleSelfHostingGuide',
)}