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!

added example of apiURL usage

Blue Mouseb1b7f3cd6821
diff --git a/src/pages/Docs/examples.js b/src/pages/Docs/examples.js
index d0bf6ad95..7f2a894f5 100644
--- a/src/pages/Docs/examples.js
+++ b/src/pages/Docs/examples.js
@@ -58,6 +58,9 @@ export const init = `swetrix.init('YOUR_PROJECT_ID', {
// anonymises all incoming data and does not pass it on
// to any third parties under any circumstances
respectDNT: false,
+
+ // Set a custom URL of the API server (for selfhosted variants of Swetrix)
+ apiURL: 'https://api.swetrix.com/log',
})
`