@productbet/tracker-core 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +33 -31
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,6 +4,8 @@ Core behavioral analytics SDK for [ProductBet](https://productbet.io). Handles s
4
4
 
5
5
  > Most users should install **[@productbet/tracker-react](https://www.npmjs.com/package/@productbet/tracker-react)** or **[@productbet/tracker-next](https://www.npmjs.com/package/@productbet/tracker-next)** instead, which include this package automatically.
6
6
 
7
+ test2
8
+
7
9
  ## Install
8
10
 
9
11
  ```bash
@@ -13,56 +15,56 @@ npm install @productbet/tracker-core
13
15
  ## Usage
14
16
 
15
17
  ```ts
16
- import { ProductBetTracker } from "@productbet/tracker-core"
18
+ import { ProductBetTracker } from "@productbet/tracker-core";
17
19
 
18
20
  const tracker = ProductBetTracker.init("pb_live_xxxx", {
19
21
  enableSessionRecording: true,
20
22
  enableAutoTracking: true,
21
- })
23
+ });
22
24
 
23
- tracker.start()
25
+ tracker.start();
24
26
 
25
27
  // Identify a user
26
- tracker.identify("user_123", { plan: "pro", company: "Acme" })
28
+ tracker.identify("user_123", { plan: "pro", company: "Acme" });
27
29
 
28
30
  // Track a custom event
29
- tracker.track("feature_used", { feature: "export", format: "csv" })
31
+ tracker.track("feature_used", { feature: "export", format: "csv" });
30
32
 
31
33
  // Stop tracking
32
- tracker.stop()
34
+ tracker.stop();
33
35
  ```
34
36
 
35
37
  ## Configuration
36
38
 
37
39
  All options are optional.
38
40
 
39
- | Option | Type | Default | Description |
40
- |---|---|---|---|
41
- | `ingestionUrl` | `string` | `"https://productbet.io/tracking"` | Ingestion endpoint URL |
42
- | `enableSessionRecording` | `boolean` | `false` | Enable rrweb session replay |
43
- | `enableAutoTracking` | `boolean` | `true` | Auto-track clicks, forms, navigation, scroll |
44
- | `enableConsoleTracking` | `boolean` | `true` | Capture console errors and warnings |
45
- | `enableNetworkTracking` | `boolean` | `true` | Capture failed network requests |
46
- | `recordCanvas` | `boolean` | `false` | Include canvas elements in recordings |
47
- | `maxQueueSize` | `number` | `1000` | Max events queued before flush |
48
- | `flushIntervalMs` | `number` | `3000` | How often events are sent (ms) |
49
- | `sessionTimeoutMs` | `number` | `1800000` | Session timeout (30 min default) |
50
- | `debug` | `boolean` | `false` | Enable debug logging |
51
- | `redaction` | `RedactionOptions` | `{ mode: "privacy-first" }` | PII redaction settings |
52
- | `autoTrackingOptions` | `AutoTrackingOptions` | See below | Fine-tune auto-tracking |
41
+ | Option | Type | Default | Description |
42
+ | ------------------------ | --------------------- | ---------------------------------- | -------------------------------------------- |
43
+ | `ingestionUrl` | `string` | `"https://productbet.io/tracking"` | Ingestion endpoint URL |
44
+ | `enableSessionRecording` | `boolean` | `false` | Enable rrweb session replay |
45
+ | `enableAutoTracking` | `boolean` | `true` | Auto-track clicks, forms, navigation, scroll |
46
+ | `enableConsoleTracking` | `boolean` | `true` | Capture console errors and warnings |
47
+ | `enableNetworkTracking` | `boolean` | `true` | Capture failed network requests |
48
+ | `recordCanvas` | `boolean` | `false` | Include canvas elements in recordings |
49
+ | `maxQueueSize` | `number` | `1000` | Max events queued before flush |
50
+ | `flushIntervalMs` | `number` | `3000` | How often events are sent (ms) |
51
+ | `sessionTimeoutMs` | `number` | `1800000` | Session timeout (30 min default) |
52
+ | `debug` | `boolean` | `false` | Enable debug logging |
53
+ | `redaction` | `RedactionOptions` | `{ mode: "privacy-first" }` | PII redaction settings |
54
+ | `autoTrackingOptions` | `AutoTrackingOptions` | See below | Fine-tune auto-tracking |
53
55
 
54
56
  ### Auto-tracking options
55
57
 
56
- | Option | Type | Default |
57
- |---|---|---|
58
- | `trackClicks` | `boolean` | `true` |
59
- | `trackForms` | `boolean` | `true` |
60
- | `trackNavigation` | `boolean` | `true` |
61
- | `trackScrollDepth` | `boolean` | `true` |
62
- | `detectRageClicks` | `boolean` | `true` |
63
- | `detectDeadClicks` | `boolean` | `true` |
64
- | `includeText` | `boolean` | `true` |
65
- | `includeClasses` | `boolean` | `true` |
58
+ | Option | Type | Default |
59
+ | ------------------ | --------- | ------- |
60
+ | `trackClicks` | `boolean` | `true` |
61
+ | `trackForms` | `boolean` | `true` |
62
+ | `trackNavigation` | `boolean` | `true` |
63
+ | `trackScrollDepth` | `boolean` | `true` |
64
+ | `detectRageClicks` | `boolean` | `true` |
65
+ | `detectDeadClicks` | `boolean` | `true` |
66
+ | `includeText` | `boolean` | `true` |
67
+ | `includeClasses` | `boolean` | `true` |
66
68
 
67
69
  ### Redaction
68
70
 
@@ -74,7 +76,7 @@ ProductBetTracker.init("pb_live_xxxx", {
74
76
  mode: "privacy-first",
75
77
  unredactFields: ["search", "email"],
76
78
  },
77
- })
79
+ });
78
80
  ```
79
81
 
80
82
  Set `mode: "visibility-first"` to capture all field values by default.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@productbet/tracker-core",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Core behavioral analytics SDK for ProductBet - session recording, event tracking, and user identification",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",