@kameleoon/react-sdk 10.20.0 → 10.21.0
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
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 10.21.0 (2026-03-04)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Introduced a new [`flushInstant`][flush] method — an asynchronous version of `flush` that returns `Promise<void>` and can be awaited:
|
|
8
|
+
- Use `await flushInstant(visitorCode)` to send tracking requests immediately and wait for completion.
|
|
9
|
+
- Use `await flushInstant()` to send tracking requests immediately for all visitors.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @kameleoon/javascript-sdk@4.19.0
|
|
15
|
+
|
|
3
16
|
## 10.20.0 (2026-02-13)
|
|
4
17
|
|
|
5
18
|
### Features
|
|
@@ -27,6 +27,28 @@ export default interface IUseData {
|
|
|
27
27
|
* - `KameleoonException.Initialization` - Method was executed before the `kameleoonClient` completed it's `initialize` call.
|
|
28
28
|
*/
|
|
29
29
|
flush: (visitorCode?: string, instant?: boolean) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Sends visitor-associated Kameleoon tracking data immediately.
|
|
32
|
+
* The collected data is sent in a tracking request and then removed from the `KameleoonClient`
|
|
33
|
+
* instance, but it remains in storage for correct targeting checks.
|
|
34
|
+
*
|
|
35
|
+
* If no visitor code is provided, the data for all visitors is sent and removed from the
|
|
36
|
+
* `KameleoonClient` instance. Before sending the current data, the method first attempts
|
|
37
|
+
* to resend any previously failed tracking requests that were stored locally during offline mode.
|
|
38
|
+
*
|
|
39
|
+
* This method sends the data instantly and returns a Promise that resolves when the
|
|
40
|
+
* tracking requests have been processed, allowing the caller to wait for completion.
|
|
41
|
+
*
|
|
42
|
+
* @param {string | undefined} visitorCode - Unique visitor identification string.
|
|
43
|
+
* Cannot exceed 255 characters in length. If omitted, data for all visitors is sent.
|
|
44
|
+
* @returns {Promise<void>} A promise that resolves when the flush operation completes.
|
|
45
|
+
*
|
|
46
|
+
* @throws `KameleoonError` with one of the following `type`s:
|
|
47
|
+
* - `KameleoonException.VisitorCodeMaxLength` - The visitor code length was exceeded
|
|
48
|
+
* - `KameleoonException.VisitorCodeEmpty` - The visitor code is empty
|
|
49
|
+
* - `KameleoonException.Initialization` - Method was executed before the `kameleoonClient` completed its `initialize` call
|
|
50
|
+
*/
|
|
51
|
+
flushInstant: (visitorCode?: string) => Promise<void>;
|
|
30
52
|
/**
|
|
31
53
|
* Creates and adds `Conversion` data to the visitor with specified parameters and executes `flushData`. Note: it's a helper method for the quick and convenient conversion tracking, however creating and adding `Conversion` manually allows more flexible `Conversion` with `negative` parameter.
|
|
32
54
|
*
|