@clianta/sdk 1.5.1 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,26 @@ All notable changes to the Clianta SDK will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.6.0] - 2026-03-01
9
+
10
+ ### Added
11
+ - **`group()` method** — Associate visitors with a company/account. The `groupId` is attached to all subsequent `track()` calls, enabling ABM (Account-Based Marketing) use cases
12
+ - **`alias()` method** — Merge two visitor identities (e.g., anonymous visitor → logged-in user). Supports cross-device identity resolution
13
+ - **`screen()` method** — Track screen views for mobile-first PWAs and SPAs. Semantic equivalent of `page()` for app screens
14
+ - **Event middleware API** — `use((event, next) => { ... })` to intercept, transform, or drop events before they're sent. Supports chaining multiple middleware functions
15
+ - **`onReady()` callback** — Register callbacks that fire when the SDK is fully initialized. If already ready, fires immediately
16
+ - **`isReady()` method** — Check initialization state synchronously
17
+ - **React `ErrorBoundary`** — `CliantaProvider` now wraps children in an ErrorBoundary to prevent SDK errors from crashing the host application
18
+ - **React `useCliantaReady()` hook** — Returns `{ isReady, tracker }` for components that need to wait for initialization
19
+ - **React `onError` prop** — `CliantaProvider` accepts an `onError` callback for custom error handling
20
+ - **New types** — `GroupTraits`, `MiddlewareFn` exported from main SDK entry
21
+
22
+ ### Changed
23
+ - `TrackerCore` interface expanded with `group()`, `alias()`, `screen()`, `use()`, `onReady()`, `isReady()` methods
24
+ - React `CliantaContext` now provides `{ tracker, isReady }` instead of just `tracker`
25
+ - `track()` now runs events through the middleware pipeline before queueing
26
+ - Events include `groupId` field when visitor is associated with a group
27
+
8
28
  ## [1.5.1] - 2026-02-28
9
29
 
10
30
  ### Added