Skip to content
This repository was archived by the owner on Feb 15, 2026. It is now read-only.

Releases: Swetrix/swetrix-js

v2.0.0 - the 31 December 2022 Release

31 Dec 04:51

Choose a tag to compare

Changelog:

  • [BREAKING] The trackViews method is now asynchronous and returns a promise. The trackViews starts working after the load event fires. It is required for the performance stats to be collected correctly.
    Most people are using the trackViews without 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 of trackViews, 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

22 May 00:41

Choose a tag to compare

Changelog:

  • The trackViews method now returns PageActions object containing a stop() 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

11 Dec 17:03

Choose a tag to compare

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

30 Nov 03:00

Choose a tag to compare

Changelog:

  • Added a heartbeat mechanism to track realtime visitors. New params noHeartbeat and heartbeatOnBackground have been introduced to the trackViews function (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

15 Oct 00:26

Choose a tag to compare

Changelog:

  • Added ignore param to trackViews method - now you can specify which pages should be blacklisted.

v1.0.3 - the 19 August 2021 Release

19 Aug 11:06

Choose a tag to compare

Changelog:

  • Added unique param to trackViews method - now you can specify whether unique or all pageview events should be saved.

v1.0.2 - the 16 August 2021 release

16 Aug 18:01

Choose a tag to compare

Changelog:

  • Fixed a bug when no log data was sent to server when viewing more than 1 page
  • Returning actions from trackViews method call

v1.0.1 - the 15 August 2021 release

15 Aug 20:51

Choose a tag to compare

v1.0.0 - Initial release

15 Aug 20:44

Choose a tag to compare

Merge branch 'main' of github.com:Blaumaus/analytics_script