This repository was archived by the owner on Feb 15, 2026. It is now read-only.
Releases: Swetrix/swetrix-js
Releases · Swetrix/swetrix-js
v2.0.0 - the 31 December 2022 Release
Changelog:
- [BREAKING] The
trackViewsmethod is now asynchronous and returns a promise. ThetrackViewsstarts working after theloadevent fires. It is required for the performance stats to be collected correctly.
Most people are using thetrackViewswithout actually using the object it returns, so upgrading to this version most likely won't affect anything. But if you are using the return value oftrackViews, you should now just call this function like this:await trackViews(...). - Now the tracking scripts collects performance stats (like DNS resolution times, TTFB, DOM Loading timing and so on).
- Updated dependencies.
v1.3.2 - the 22 May 2022 Release
Changelog:
- The
trackViewsmethod now returnsPageActionsobject containing astop()method which allows you to stop the tracking of pages. - Improved the JSDoc documentation of the Swetrix library methods and it's TypeScript interfaces.
v1.3.0 - the 11 December 2021 Release
Changelog:
- Added ability to set a custom URL of the API server (for selfhosted variants of Swetrix).
v1.2.0 - the 30 November 2021 Release
Changelog:
- Added a heartbeat mechanism to track realtime visitors. New params
noHeartbeatandheartbeatOnBackgroundhave been introduced to thetrackViewsfunction (see the detailed description here). - Using XMLHttpRequest instead of Fetch API for better browser compatibility.
- Other minor improvements and optimisations.
v1.1.0 - the 15 October 2021 Release
Changelog:
- Added
ignoreparam totrackViewsmethod - now you can specify which pages should be blacklisted.
v1.0.3 - the 19 August 2021 Release
Changelog:
- Added
uniqueparam totrackViewsmethod - now you can specify whether unique or all pageview events should be saved.
v1.0.2 - the 16 August 2021 release
Changelog:
- Fixed a bug when no log data was sent to server when viewing more than 1 page
- Returning
actionsfromtrackViewsmethod call
v1.0.1 - the 15 August 2021 release
v1.0.1 build
v1.0.0 - Initial release
Merge branch 'main' of github.com:Blaumaus/analytics_script