@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/index.js
CHANGED
|
@@ -1277,7 +1277,15 @@ var UserFlowTracker = class {
|
|
|
1277
1277
|
console.warn("[UserFlow] Cannot track outside browser environment");
|
|
1278
1278
|
return null;
|
|
1279
1279
|
}
|
|
1280
|
+
console.log("[UserFlow] start() called", {
|
|
1281
|
+
enabled: this.config.enabled,
|
|
1282
|
+
samplingRate: this.config.samplingRate,
|
|
1283
|
+
currentState: this.state,
|
|
1284
|
+
apiUrl: this.apiUrl,
|
|
1285
|
+
hasSessionToken: !!this.sessionToken
|
|
1286
|
+
});
|
|
1280
1287
|
if (!this.config.enabled) {
|
|
1288
|
+
console.warn("[UserFlow] Tracking disabled by config");
|
|
1281
1289
|
return null;
|
|
1282
1290
|
}
|
|
1283
1291
|
if (this.state === "tracking") {
|
|
@@ -2631,6 +2639,15 @@ Check the Network tab in DevTools for more details.`
|
|
|
2631
2639
|
*/
|
|
2632
2640
|
async initUserFlowTracking() {
|
|
2633
2641
|
try {
|
|
2642
|
+
console.log(
|
|
2643
|
+
"%c\u{1F4CA} Initializing User Flow Tracking",
|
|
2644
|
+
"background: #8b5cf6; color: #fff; padding: 2px 6px; border-radius: 3px;",
|
|
2645
|
+
{
|
|
2646
|
+
config: this.config.userFlows,
|
|
2647
|
+
apiUrl: this.config.apiUrl,
|
|
2648
|
+
sdkKey: this.config.sdkKey ? "present" : "missing"
|
|
2649
|
+
}
|
|
2650
|
+
);
|
|
2634
2651
|
this.userFlowTracker = new UserFlowTracker(this.config.userFlows);
|
|
2635
2652
|
this.userFlowTracker.initialize(
|
|
2636
2653
|
this.sessionToken,
|
|
@@ -2640,12 +2657,27 @@ Check the Network tab in DevTools for more details.`
|
|
|
2640
2657
|
const recordingSessionId = this.recorder?.getSessionId?.() || null;
|
|
2641
2658
|
const sessionId = await this.userFlowTracker.start(recordingSessionId);
|
|
2642
2659
|
if (sessionId) {
|
|
2660
|
+
console.log(
|
|
2661
|
+
"%c\u2705 User Flow Tracking Started",
|
|
2662
|
+
"background: #10b981; color: #fff; padding: 2px 6px; border-radius: 3px;",
|
|
2663
|
+
{ flowSessionId: sessionId, linkedRecordingSession: recordingSessionId }
|
|
2664
|
+
);
|
|
2643
2665
|
await this.log("info", "User flow tracking started", {
|
|
2644
2666
|
flowSessionId: sessionId,
|
|
2645
2667
|
linkedRecordingSession: recordingSessionId
|
|
2646
2668
|
});
|
|
2669
|
+
} else {
|
|
2670
|
+
console.warn(
|
|
2671
|
+
"%c\u26A0\uFE0F User Flow Tracking: No session ID returned",
|
|
2672
|
+
"background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px;"
|
|
2673
|
+
);
|
|
2647
2674
|
}
|
|
2648
2675
|
} catch (error) {
|
|
2676
|
+
console.error(
|
|
2677
|
+
"%c\u274C User Flow Tracking Failed",
|
|
2678
|
+
"background: #ef4444; color: #fff; padding: 2px 6px; border-radius: 3px;",
|
|
2679
|
+
error
|
|
2680
|
+
);
|
|
2649
2681
|
await this.log("warn", "Failed to initialize user flow tracking", {
|
|
2650
2682
|
error: error instanceof Error ? error.message : String(error)
|
|
2651
2683
|
});
|