@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/react.mjs CHANGED
@@ -1198,7 +1198,15 @@ var UserFlowTracker = class {
1198
1198
  console.warn("[UserFlow] Cannot track outside browser environment");
1199
1199
  return null;
1200
1200
  }
1201
+ console.log("[UserFlow] start() called", {
1202
+ enabled: this.config.enabled,
1203
+ samplingRate: this.config.samplingRate,
1204
+ currentState: this.state,
1205
+ apiUrl: this.apiUrl,
1206
+ hasSessionToken: !!this.sessionToken
1207
+ });
1201
1208
  if (!this.config.enabled) {
1209
+ console.warn("[UserFlow] Tracking disabled by config");
1202
1210
  return null;
1203
1211
  }
1204
1212
  if (this.state === "tracking") {
@@ -2549,6 +2557,15 @@ Check the Network tab in DevTools for more details.`
2549
2557
  */
2550
2558
  async initUserFlowTracking() {
2551
2559
  try {
2560
+ console.log(
2561
+ "%c\u{1F4CA} Initializing User Flow Tracking",
2562
+ "background: #8b5cf6; color: #fff; padding: 2px 6px; border-radius: 3px;",
2563
+ {
2564
+ config: this.config.userFlows,
2565
+ apiUrl: this.config.apiUrl,
2566
+ sdkKey: this.config.sdkKey ? "present" : "missing"
2567
+ }
2568
+ );
2552
2569
  this.userFlowTracker = new UserFlowTracker(this.config.userFlows);
2553
2570
  this.userFlowTracker.initialize(
2554
2571
  this.sessionToken,
@@ -2558,12 +2575,27 @@ Check the Network tab in DevTools for more details.`
2558
2575
  const recordingSessionId = this.recorder?.getSessionId?.() || null;
2559
2576
  const sessionId = await this.userFlowTracker.start(recordingSessionId);
2560
2577
  if (sessionId) {
2578
+ console.log(
2579
+ "%c\u2705 User Flow Tracking Started",
2580
+ "background: #10b981; color: #fff; padding: 2px 6px; border-radius: 3px;",
2581
+ { flowSessionId: sessionId, linkedRecordingSession: recordingSessionId }
2582
+ );
2561
2583
  await this.log("info", "User flow tracking started", {
2562
2584
  flowSessionId: sessionId,
2563
2585
  linkedRecordingSession: recordingSessionId
2564
2586
  });
2587
+ } else {
2588
+ console.warn(
2589
+ "%c\u26A0\uFE0F User Flow Tracking: No session ID returned",
2590
+ "background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px;"
2591
+ );
2565
2592
  }
2566
2593
  } catch (error) {
2594
+ console.error(
2595
+ "%c\u274C User Flow Tracking Failed",
2596
+ "background: #ef4444; color: #fff; padding: 2px 6px; border-radius: 3px;",
2597
+ error
2598
+ );
2567
2599
  await this.log("warn", "Failed to initialize user flow tracking", {
2568
2600
  error: error instanceof Error ? error.message : String(error)
2569
2601
  });