aurea-tracking-sdk 1.4.0 → 1.5.1

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/index.d.mts CHANGED
@@ -234,6 +234,21 @@ declare class AureaSDK {
234
234
  * Get current event category statistics
235
235
  */
236
236
  getCategoryStats(): Record<EventCategory, number>;
237
+ /**
238
+ * Get anonymous ID
239
+ * Returns the persistent identifier for this user across sessions
240
+ */
241
+ getAnonymousId(): string;
242
+ /**
243
+ * Get session ID
244
+ * Returns the unique identifier for this browsing session
245
+ */
246
+ getSessionId(): string;
247
+ /**
248
+ * Get user ID
249
+ * Returns the identified user ID if user has been identified
250
+ */
251
+ getUserId(): string | undefined;
237
252
  /**
238
253
  * Get current funnel stage
239
254
  */
package/dist/index.d.ts CHANGED
@@ -234,6 +234,21 @@ declare class AureaSDK {
234
234
  * Get current event category statistics
235
235
  */
236
236
  getCategoryStats(): Record<EventCategory, number>;
237
+ /**
238
+ * Get anonymous ID
239
+ * Returns the persistent identifier for this user across sessions
240
+ */
241
+ getAnonymousId(): string;
242
+ /**
243
+ * Get session ID
244
+ * Returns the unique identifier for this browsing session
245
+ */
246
+ getSessionId(): string;
247
+ /**
248
+ * Get user ID
249
+ * Returns the identified user ID if user has been identified
250
+ */
251
+ getUserId(): string | undefined;
237
252
  /**
238
253
  * Get current funnel stage
239
254
  */
package/dist/index.js CHANGED
@@ -407,6 +407,27 @@ var AureaSDK = class {
407
407
  getCategoryStats() {
408
408
  return Object.fromEntries(this.eventCategoryStats);
409
409
  }
410
+ /**
411
+ * Get anonymous ID
412
+ * Returns the persistent identifier for this user across sessions
413
+ */
414
+ getAnonymousId() {
415
+ return this.anonymousId;
416
+ }
417
+ /**
418
+ * Get session ID
419
+ * Returns the unique identifier for this browsing session
420
+ */
421
+ getSessionId() {
422
+ return this.sessionId;
423
+ }
424
+ /**
425
+ * Get user ID
426
+ * Returns the identified user ID if user has been identified
427
+ */
428
+ getUserId() {
429
+ return this.userId;
430
+ }
410
431
  /**
411
432
  * Get current funnel stage
412
433
  */
@@ -663,9 +684,6 @@ var AureaSDK = class {
663
684
  async endSession() {
664
685
  if (typeof window === "undefined") return;
665
686
  const now = Date.now();
666
- if (this.isInCheckout && this.currentStage === "checkout") {
667
- this.checkoutAbandoned("session_end");
668
- }
669
687
  if (this.isPageVisible) {
670
688
  this.activeTime += now - this.lastActiveTimestamp;
671
689
  }
@@ -1143,9 +1161,6 @@ var AureaSDK = class {
1143
1161
  window.addEventListener("touchstart", resetInactivityTimer, { passive: true });
1144
1162
  window.addEventListener("beforeunload", () => {
1145
1163
  const now = Date.now();
1146
- if (this.isInCheckout && this.currentStage === "checkout") {
1147
- this.checkoutAbandoned("page_close");
1148
- }
1149
1164
  if (this.isPageVisible) {
1150
1165
  this.activeTime += now - this.lastActiveTimestamp;
1151
1166
  }
package/dist/index.mjs CHANGED
@@ -378,6 +378,27 @@ var AureaSDK = class {
378
378
  getCategoryStats() {
379
379
  return Object.fromEntries(this.eventCategoryStats);
380
380
  }
381
+ /**
382
+ * Get anonymous ID
383
+ * Returns the persistent identifier for this user across sessions
384
+ */
385
+ getAnonymousId() {
386
+ return this.anonymousId;
387
+ }
388
+ /**
389
+ * Get session ID
390
+ * Returns the unique identifier for this browsing session
391
+ */
392
+ getSessionId() {
393
+ return this.sessionId;
394
+ }
395
+ /**
396
+ * Get user ID
397
+ * Returns the identified user ID if user has been identified
398
+ */
399
+ getUserId() {
400
+ return this.userId;
401
+ }
381
402
  /**
382
403
  * Get current funnel stage
383
404
  */
@@ -634,9 +655,6 @@ var AureaSDK = class {
634
655
  async endSession() {
635
656
  if (typeof window === "undefined") return;
636
657
  const now = Date.now();
637
- if (this.isInCheckout && this.currentStage === "checkout") {
638
- this.checkoutAbandoned("session_end");
639
- }
640
658
  if (this.isPageVisible) {
641
659
  this.activeTime += now - this.lastActiveTimestamp;
642
660
  }
@@ -1114,9 +1132,6 @@ var AureaSDK = class {
1114
1132
  window.addEventListener("touchstart", resetInactivityTimer, { passive: true });
1115
1133
  window.addEventListener("beforeunload", () => {
1116
1134
  const now = Date.now();
1117
- if (this.isInCheckout && this.currentStage === "checkout") {
1118
- this.checkoutAbandoned("page_close");
1119
- }
1120
1135
  if (this.isPageVisible) {
1121
1136
  this.activeTime += now - this.lastActiveTimestamp;
1122
1137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aurea-tracking-sdk",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "description": "Standalone tracking SDK for Aurea CRM external funnels",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",