rampkit-expo-dev 0.0.64 → 0.0.65

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.
@@ -17,6 +17,7 @@ declare class EventManager {
17
17
  private currentPlacement;
18
18
  private onboardingStartTime;
19
19
  private currentOnboardingId;
20
+ private onboardingCompletedForSession;
20
21
  private initialized;
21
22
  static get instance(): EventManager;
22
23
  /**
@@ -33,6 +33,7 @@ class EventManager {
33
33
  // Onboarding tracking
34
34
  this.onboardingStartTime = null;
35
35
  this.currentOnboardingId = null;
36
+ this.onboardingCompletedForSession = false;
36
37
  // Initialization state
37
38
  this.initialized = false;
38
39
  }
@@ -101,6 +102,7 @@ class EventManager {
101
102
  this.currentOnboardingId = onboardingId;
102
103
  this.onboardingStartTime = new Date();
103
104
  this.currentFlowId = onboardingId;
105
+ this.onboardingCompletedForSession = false;
104
106
  }
105
107
  /**
106
108
  * Get onboarding duration in seconds
@@ -213,6 +215,11 @@ class EventManager {
213
215
  * Track onboarding abandoned
214
216
  */
215
217
  trackOnboardingAbandoned(reason, lastScreenName, onboardingId) {
218
+ // Skip if onboarding was already completed this session
219
+ if (this.onboardingCompletedForSession) {
220
+ console.log("[RampKit] EventManager: onboarding_abandoned skipped (already completed)");
221
+ return;
222
+ }
216
223
  const timeSpentSeconds = this.getOnboardingDurationSeconds();
217
224
  this.track("onboarding_abandoned", {
218
225
  onboardingId: onboardingId || this.currentOnboardingId,
@@ -247,6 +254,8 @@ class EventManager {
247
254
  totalSteps,
248
255
  trigger,
249
256
  });
257
+ // Mark as completed so abandoned won't fire for this session
258
+ this.onboardingCompletedForSession = true;
250
259
  this.endOnboardingTracking();
251
260
  }
252
261
  /**
@@ -318,6 +327,7 @@ class EventManager {
318
327
  this.currentPlacement = null;
319
328
  this.onboardingStartTime = null;
320
329
  this.currentOnboardingId = null;
330
+ this.onboardingCompletedForSession = false;
321
331
  this.initialized = false;
322
332
  }
323
333
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rampkit-expo-dev",
3
- "version": "0.0.64",
3
+ "version": "0.0.65",
4
4
  "description": "The Expo SDK for RampKit. Build, test, and personalize app onboardings with instant updates.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",