@prodact.ai/sdk 0.0.8 → 0.0.9
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/dist/cdn/sdk.global.js +2 -2
- package/dist/cdn/sdk.global.js.map +1 -1
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -0
- package/dist/index.mjs.map +1 -1
- package/dist/react.js +32 -0
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +32 -0
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -1242,7 +1242,15 @@ var UserFlowTracker = class {
|
|
|
1242
1242
|
console.warn("[UserFlow] Cannot track outside browser environment");
|
|
1243
1243
|
return null;
|
|
1244
1244
|
}
|
|
1245
|
+
console.log("[UserFlow] start() called", {
|
|
1246
|
+
enabled: this.config.enabled,
|
|
1247
|
+
samplingRate: this.config.samplingRate,
|
|
1248
|
+
currentState: this.state,
|
|
1249
|
+
apiUrl: this.apiUrl,
|
|
1250
|
+
hasSessionToken: !!this.sessionToken
|
|
1251
|
+
});
|
|
1245
1252
|
if (!this.config.enabled) {
|
|
1253
|
+
console.warn("[UserFlow] Tracking disabled by config");
|
|
1246
1254
|
return null;
|
|
1247
1255
|
}
|
|
1248
1256
|
if (this.state === "tracking") {
|
|
@@ -2593,6 +2601,15 @@ Check the Network tab in DevTools for more details.`
|
|
|
2593
2601
|
*/
|
|
2594
2602
|
async initUserFlowTracking() {
|
|
2595
2603
|
try {
|
|
2604
|
+
console.log(
|
|
2605
|
+
"%c\u{1F4CA} Initializing User Flow Tracking",
|
|
2606
|
+
"background: #8b5cf6; color: #fff; padding: 2px 6px; border-radius: 3px;",
|
|
2607
|
+
{
|
|
2608
|
+
config: this.config.userFlows,
|
|
2609
|
+
apiUrl: this.config.apiUrl,
|
|
2610
|
+
sdkKey: this.config.sdkKey ? "present" : "missing"
|
|
2611
|
+
}
|
|
2612
|
+
);
|
|
2596
2613
|
this.userFlowTracker = new UserFlowTracker(this.config.userFlows);
|
|
2597
2614
|
this.userFlowTracker.initialize(
|
|
2598
2615
|
this.sessionToken,
|
|
@@ -2602,12 +2619,27 @@ Check the Network tab in DevTools for more details.`
|
|
|
2602
2619
|
const recordingSessionId = this.recorder?.getSessionId?.() || null;
|
|
2603
2620
|
const sessionId = await this.userFlowTracker.start(recordingSessionId);
|
|
2604
2621
|
if (sessionId) {
|
|
2622
|
+
console.log(
|
|
2623
|
+
"%c\u2705 User Flow Tracking Started",
|
|
2624
|
+
"background: #10b981; color: #fff; padding: 2px 6px; border-radius: 3px;",
|
|
2625
|
+
{ flowSessionId: sessionId, linkedRecordingSession: recordingSessionId }
|
|
2626
|
+
);
|
|
2605
2627
|
await this.log("info", "User flow tracking started", {
|
|
2606
2628
|
flowSessionId: sessionId,
|
|
2607
2629
|
linkedRecordingSession: recordingSessionId
|
|
2608
2630
|
});
|
|
2631
|
+
} else {
|
|
2632
|
+
console.warn(
|
|
2633
|
+
"%c\u26A0\uFE0F User Flow Tracking: No session ID returned",
|
|
2634
|
+
"background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px;"
|
|
2635
|
+
);
|
|
2609
2636
|
}
|
|
2610
2637
|
} catch (error) {
|
|
2638
|
+
console.error(
|
|
2639
|
+
"%c\u274C User Flow Tracking Failed",
|
|
2640
|
+
"background: #ef4444; color: #fff; padding: 2px 6px; border-radius: 3px;",
|
|
2641
|
+
error
|
|
2642
|
+
);
|
|
2611
2643
|
await this.log("warn", "Failed to initialize user flow tracking", {
|
|
2612
2644
|
error: error instanceof Error ? error.message : String(error)
|
|
2613
2645
|
});
|