@tracelog/capture-web 2.3.1 → 2.5.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
@@ -18,6 +18,18 @@ patch, and neither requires reading your code.
18
18
  Entries after 1.0.0 are drafted from the commits that touched this package and
19
19
  edited before release.
20
20
 
21
+ ## [2.5.0](https://github.com/nacorga/tracelog-sdk/compare/capture-web@2.4.0...capture-web@2.5.0) (2026-11-19)
22
+
23
+
24
+ * **capture-web:** Synchronize tracelog-sdk versions
25
+
26
+ ## [2.4.0](https://github.com/nacorga/tracelog-sdk/compare/capture-web@2.3.1...capture-web@2.4.0) (2026-10-26)
27
+
28
+
29
+ ### Added
30
+
31
+ * **capture-web:** the first in the published types ([154032e](https://github.com/nacorga/tracelog-sdk/commit/154032e137540c007771a3e60ad1657494b975af))
32
+
21
33
  ## [2.3.1](https://github.com/nacorga/tracelog-sdk/compare/capture-web@2.3.0...capture-web@2.3.1) (2026-10-26)
22
34
 
23
35
 
package/README.md CHANGED
@@ -22,13 +22,13 @@ as they are served.
22
22
  <!-- x-release-please-start-version -->
23
23
 
24
24
  ```bash
25
- npm install --save-exact @tracelog/capture-web@2.3.1
25
+ npm install --save-exact @tracelog/capture-web@2.5.0
26
26
  ```
27
27
 
28
28
  Without a build step, the same runtime as a script tag:
29
29
 
30
30
  ```html
31
- <script src="https://cdn.tracelog.io/v/2.3.1/tracelog.js"></script>
31
+ <script src="https://cdn.tracelog.io/v/2.5.0/tracelog.js"></script>
32
32
  ```
33
33
 
34
34
  <!-- x-release-please-end -->
@@ -69,14 +69,14 @@ visitors nothing.
69
69
 
70
70
  That is all of it, and it is what the major version protects.
71
71
 
72
- | Call | Does |
73
- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
74
- | `TraceLog.init(options)` | Configures the runtime. `key` is the project's public key. |
75
- | `TraceLog.consent.grant()` | Allows capture. Queued delivery begins. |
76
- | `TraceLog.consent.deny()` | Keeps the runtime inert. |
77
- | `TraceLog.consent.state()` | `"unknown" \| "granted" \| "denied"`. |
78
- | `TraceLog.step(name, context?, opts?)` | A declared step of the conversion path. `opts.items` are the items it shows. |
79
- | `TraceLog.conversion(name, opts)` | A declared conversion. `opts.identifier` is its stable identifier. `opts.items`, `opts.scheduledFor` and `opts.recurring` say what it was for. |
72
+ | Call | Does |
73
+ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
74
+ | `TraceLog.init(options)` | Configures the runtime. `key` is the project's public key. |
75
+ | `TraceLog.consent.grant()` | Allows capture. Queued delivery begins. |
76
+ | `TraceLog.consent.deny()` | Keeps the runtime inert. |
77
+ | `TraceLog.consent.state()` | `"unknown" \| "granted" \| "denied"`. |
78
+ | `TraceLog.step(name, context?, opts?)` | A declared step of the conversion path. `opts.items` are the items it shows. |
79
+ | `TraceLog.conversion(name, opts)` | A declared conversion. `opts.identifier` is its stable identifier. `opts.items`, `opts.scheduledFor` and `opts.recurring` say what it was for, and `opts.first` whether it is the person's first. |
80
80
 
81
81
  `init` also accepts `mode: "verification"`, which a distributed platform artifact
82
82
  declares for its platform's own test order. A site's own snippet never sets it —
@@ -104,9 +104,9 @@ views, not clicks, not scroll, not keystrokes. Errors are captured only when
104
104
  they occur inside the conversion path, attached to the step where they
105
105
  happened.
106
106
 
107
- A conversion may carry its items, the day a booking is for and whether it
108
- recurs, and a step the items it shows; a malformed one is left out and the
109
- event sent without it.
107
+ A conversion may carry its items, the day a booking is for, whether it recurs
108
+ and whether it is the person's first, and a step the items it shows; a
109
+ malformed one is left out and the event sent without it.
110
110
 
111
111
  Beside each conversion, which GA4, Meta and Google Ads tags the page requested
112
112
  just before and after it — the tag's kind, its id and, for Meta, the event —
@@ -29,6 +29,8 @@ export interface ConversionOptions {
29
29
  /** The day a booking is for, YYYY-MM-DD. */
30
30
  scheduledFor?: string;
31
31
  recurring?: boolean;
32
+ /** Whether the site's records hold no earlier conversion of this kind by the same person. */
33
+ first?: boolean;
32
34
  }
33
35
 
34
36
  declare const TraceLog: {
@@ -351,6 +351,7 @@ function createCaptureEngine(ports, acquisition) {
351
351
  ...(typeof options.recurring === "boolean"
352
352
  ? { recurring: options.recurring }
353
353
  : {}),
354
+ ...(typeof options.first === "boolean" ? { first: options.first } : {}),
354
355
  });
355
356
  }
356
357
  lastDeclaredName = pendingEvent.name;
@@ -352,6 +352,7 @@ function createCaptureEngine(ports, acquisition) {
352
352
  ...(typeof options.recurring === "boolean"
353
353
  ? { recurring: options.recurring }
354
354
  : {}),
355
+ ...(typeof options.first === "boolean" ? { first: options.first } : {}),
355
356
  });
356
357
  }
357
358
  lastDeclaredName = pendingEvent.name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracelog/capture-web",
3
- "version": "2.3.1",
3
+ "version": "2.5.0",
4
4
  "description": "The TraceLog browser capture runtime: consent-first, pinned per version.",
5
5
  "keywords": [
6
6
  "conversion",
@@ -46,8 +46,8 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "typescript": "5.9.3",
49
- "@tracelog/capture-core": "2.3.1",
50
- "@tracelog/event-contract": "2.3.1"
49
+ "@tracelog/capture-core": "2.5.0",
50
+ "@tracelog/event-contract": "2.5.0"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "tsc -p tsconfig.build.json && node build.mjs",