Skip to content

Releases: Swetrix/swetrix-node

v3.0.1

26 Dec 00:29

Choose a tag to compare

Changelog:

  • Fixed broken CJS exports

v3.0.0

26 Dec 00:19

Choose a tag to compare

Breaking Changes

  • All tracking methods (track, trackPageView, trackError, heartbeat) now return Promise<void> for async/await support.

New Features

  • Feature Flags: Added getFeatureFlags() and getFeatureFlag() to evaluate feature flags server-side with automatic 5-minute caching.
  • A/B Testing: Added getExperiments() and getExperiment() to retrieve experiment variants for users.
  • Profile ID: Added getProfileId() to get or generate an anonymous profile ID for long-term user tracking and revenue attribution.
  • Session ID: Added getSessionId() to retrieve the current session ID for revenue attribution.
  • Profile ID Option: Added profileId to LibOptions for global long-term user tracking across all calls.
  • Cache Management: Added clearFeatureFlagsCache() and clearExperimentsCache() to force fresh data fetching.

Improvements

  • Enhanced TrackErrorOptions with stackTrace, tz, lc, pg, and meta fields.
  • Metadata objects now support string | number | boolean | null | undefined values.

v2.1.0

26 Oct 20:14

Choose a tag to compare

Changelog:

  • Removed prev parameter from pageview tracking.

v2.0.0

01 Jul 19:28

Choose a tag to compare

Changelog:

  • Removed debug init option in favour of devMode.
  • Removed ignore and doNotAnonymise options.
  • Added support for metadata to pageview and custom events tracking.
  • Added error tracking support (trackError function).
  • Set up prettier.

v1.0.0

09 Sep 16:16
cb450c8

Choose a tag to compare

Initial release.