Skip to content

v3.0.0

Choose a tag to compare

@Blaumaus Blaumaus released this 26 Dec 00:19
· 1 commit to main since this release

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.