Change log
Notable changes to the Improve SDK packages, including breaking changes and how to upgrade.
2 min read
Notable changes to the Improve SDK packages (@obelism/improve-sdk, @obelism/improve-sdk-react, @obelism/improve-sdk-next). Full release notes live in the SDK repository, one changelog per package.
Core SDK (@obelism/improve-sdk)
2.0.0
- Breaking: analytics are decoupled from tests. Events are now test-independent and attribution happens server-side by joining a visitor's exposures against the event stream.
postAnalyticdropped its leadingtestSlugargument:postAnalytic(event, payload?). An event is recorded once per visitor per page/session, independent of any test.- Exposures are automatic.
getTestValue/getFlagValuenow emit an exposure beacon the first time they resolve a non-holdout variant for a visitor. A visitor must read a test/flag's variant for their subsequent events to be attributed to it; audience-excluded and holdout visitors are never exposed. The old implicit "first tracked event = exposure" behaviour is gone. POST /api/logbodies are now discriminated by atype: 'event' | 'exposure'field, and event bodies no longer carrytestId/testValue. This is a hard cutover: old beacons are rejected.- The GTM
dataLayerimproveblock no longer containstest/variant, onlyvisitorId. Compare variants in the test Monitor, not via a GTM/Google Ads split.
1.0.0
- Breaking: requires
ua-parser-jsv2 as a peer dependency (was v1). The SDK now uses the named{ UAParser }export. Runnpm i ua-parser-js@^2when upgrading.
0.5.0
- Added Google Tag Manager / Google Ads
dataLayerintegration.postAnalyticnow mirrors each event ontowindow.dataLayerwith experiment dimensions. Enabled by default; opt out withdataLayer: false.
0.4.0
- Reliability, security and performance improvements.
0.3.x
0.3.2: ExposedorganizationId,environmentandstateproperties;fetchConfignow returns the loaded config.0.3.1: Added thebaseUrlsetup arg (point the SDK at your Improve instance).0.3.0: Server API authentication via thetokensetup arg.
React & Next SDKs (@obelism/improve-sdk-react, @obelism/improve-sdk-next)
1.0.0
- Breaking: tracks the core SDK
2.0.0line.usePostAnalytic()now takes no arguments and returns a global post function(event, payload?) => …; it is no longer bound to a test slug. Reading a variant withuseTestValue/useFlagValuerecords the exposure that events are attributed to.
0.5.x
- Reliability, security and performance improvements; track the core SDK
1.0.0line.
0.4.0
- Added the
useImproveStatushook for reading the provider lifecycle (loading/setup/error).