@metarouter/react-native-sdk 1.4.0 → 1.5.0

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/README.md CHANGED
@@ -5,6 +5,22 @@
5
5
 
6
6
  A lightweight React Native analytics SDK that transmits events to your MetaRouter cluster.
7
7
 
8
+ ## Table of Contents
9
+
10
+ - [Installation](#installation)
11
+ - [Usage](#usage)
12
+ - [Basic Setup](#basic-setup)
13
+ - [React Context Usage](#react-context-usage)
14
+ - [Direct Usage](#direct-usage)
15
+ - [API Reference](#api-reference)
16
+ - [Features](#features)
17
+ - [Compatibility](#-compatibility)
18
+ - [Debugging](#debugging)
19
+ - [Identity Persistence](#identity-persistence)
20
+ - [Advertising ID (IDFA/GAID)](#advertising-id-idfagaid)
21
+ - [Using the alias() Method](#using-the-alias-method)
22
+ - [License](#license)
23
+
8
24
  ## Installation
9
25
 
10
26
  ```sh
@@ -88,7 +104,8 @@ const MyComponent = () => {
88
104
  ```js
89
105
  import { createAnalyticsClient } from "@metarouter/react-native-sdk";
90
106
 
91
- // Initialize optionally await it but can use at anytime with events transmitted when client is available.
107
+ // Initialize the client (optionally await it), but you can use it at any time
108
+ // with events transmitted when the client is ready.
92
109
  const analytics = await createAnalyticsClient({
93
110
  writeKey: "your-write-key",
94
111
  ingestionHost: "https://your-ingestion-endpoint.com",
@@ -111,6 +128,12 @@ analytics.screen("Home Screen", {
111
128
  category: "navigation",
112
129
  });
113
130
 
131
+ // Track page views
132
+ analytics.page("Home Page", {
133
+ url: "/home",
134
+ referrer: "/landing",
135
+ });
136
+
114
137
  // Group users
115
138
  analytics.group("company123", {
116
139
  name: "Acme Corp",
@@ -157,9 +180,11 @@ The analytics client provides the following methods:
157
180
  - `identify(userId: string, traits?: Record<string, any>)`: Identify users
158
181
  - `group(groupId: string, traits?: Record<string, any>)`: Group users
159
182
  - `screen(name: string, properties?: Record<string, any>)`: Track screen views
160
- - `alias(newUserId: string)`: Alias user IDs
183
+ - `page(name: string, properties?: Record<string, any>)`: Track page views
184
+ - `alias(newUserId: string)`: Connect anonymous users to known user IDs. See [Using the alias() Method](#using-the-alias-method) for details
161
185
  - `setAdvertisingId(advertisingId: string)`: Set the advertising identifier (IDFA on iOS, GAID on Android) for ad tracking. See [Advertising ID](#advertising-id-idfagaid) section for usage and compliance requirements
162
186
  - `clearAdvertisingId()`: Clear the advertising identifier from storage and context. Useful for GDPR/CCPA compliance when users opt out of ad tracking
187
+ - `setTracing(enabled: boolean)`: Enable or disable tracing headers on API requests. When enabled, includes a `Trace: true` header for debugging request flows
163
188
  - `flush()`: Flush events immediately
164
189
  - `reset()`: Reset analytics state and clear all stored data (includes clearing advertising ID)
165
190
  - `enableDebugLogging()`: Enable debug logging
@@ -229,7 +254,7 @@ await analytics.flush();
229
254
  ### 4. Common Issues
230
255
 
231
256
  - **Network Permissions**: Ensure your app has network permissions
232
- - **AsyncStorage**: The SDK uses AsyncStorage for anonymous ID persistence
257
+ - **AsyncStorage**: The SDK uses AsyncStorage for identity persistence (anonymousId, userId, groupId, advertisingId)
233
258
  - **Endpoint URL**: Verify your ingestion endpoint is correct and accessible
234
259
  - **Write Key**: Ensure your write key is valid
235
260
 
@@ -268,6 +293,301 @@ sentAt semantics: sentAt is stamped when the event is enqueued. If the client is
268
293
  - `anonymousId` is a stable, persisted UUID for the device/user before identify; it does **not** include timestamps.
269
294
  - `messageId` is generated as `<epochMillis>-<uuid>` (e.g., `1734691572843-6f0c7e85-...`) to aid debugging.
270
295
 
296
+ ## Identity Persistence
297
+
298
+ The MetaRouter React Native SDK automatically manages and persists user identifiers across app sessions using React Native's AsyncStorage. This ensures consistent user tracking even after app restarts.
299
+
300
+ ### The Four Identity Fields
301
+
302
+ #### 1. userId (Common User ID)
303
+
304
+ The `userId` is set when you identify a user and represents their unique identifier in your system (e.g., database ID, email, employee ID).
305
+
306
+ **How to set:**
307
+
308
+ ```js
309
+ analytics.identify("user123", {
310
+ name: "John Doe",
311
+ email: "john@example.com",
312
+ role: "Sales Associate",
313
+ });
314
+ ```
315
+
316
+ **Behavior:**
317
+
318
+ - Persisted to device storage (`AsyncStorage` key: `metarouter:user_id`)
319
+ - Automatically loaded on app restart
320
+ - Automatically included in **all** subsequent events (`track`, `page`, `screen`, `group`)
321
+ - Remains set until `reset()` is called or app is uninstalled
322
+
323
+ **Example flow:**
324
+
325
+ ```js
326
+ // Day 1: User logs in
327
+ analytics.identify("employeeID", { name: "Jane" });
328
+ analytics.track("Product Viewed", { sku: "ABC123" });
329
+ // Event includes: userId: "employeeID"
330
+
331
+ // App restarts...
332
+
333
+ // Day 2: User opens app
334
+ analytics.track("App Opened");
335
+ // Event STILL includes: userId: "employeeID" (auto-loaded from storage)
336
+ ```
337
+
338
+ #### 2. anonymousId
339
+
340
+ The `anonymousId` is a unique identifier automatically generated for each device/installation before a user is identified.
341
+
342
+ **How it's set:**
343
+
344
+ - **Automatically** generated as a UUID v4 on first SDK initialization
345
+ - No manual action required
346
+
347
+ **Behavior:**
348
+
349
+ - Persisted to device storage (`AsyncStorage` key: `metarouter:anonymous_id`)
350
+ - Automatically loaded on app restart
351
+ - Automatically included in **all** events
352
+ - Remains stable across app sessions until `reset()` is called
353
+ - Cleared on `reset()` and a **new** UUID is generated on next `init()`
354
+
355
+ **Use case:**
356
+ Track user behavior before they log in or create an account, then connect pre-login and post-login activity using the `alias()` method.
357
+
358
+ #### 3. groupId
359
+
360
+ The `groupId` associates a user with an organization, team, account, or other group entity.
361
+
362
+ **How to set:**
363
+
364
+ ```js
365
+ analytics.group("company123", {
366
+ name: "Acme Corp",
367
+ plan: "Enterprise",
368
+ industry: "Technology",
369
+ });
370
+ ```
371
+
372
+ **Behavior:**
373
+
374
+ - Persisted to device storage (`AsyncStorage` key: `metarouter:group_id`)
375
+ - Automatically loaded on app restart
376
+ - Automatically included in **all** subsequent events after being set
377
+ - Remains set until `reset()` is called
378
+
379
+ **Example use case:**
380
+
381
+ ```js
382
+ // User logs into their company account
383
+ analytics.identify("user123", { name: "Jane" });
384
+ analytics.group("acme-corp", { name: "Acme Corp" });
385
+
386
+ // All future events include both userId and groupId
387
+ analytics.track("Report Generated");
388
+ // Event includes: userId: "user123", groupId: "acme-corp"
389
+ ```
390
+
391
+ #### 4. advertisingId (Optional)
392
+
393
+ The `advertisingId` is used for ad tracking and attribution (IDFA on iOS, GAID on Android). See the [Advertising ID](#advertising-id-idfagaid) section below for detailed usage and compliance requirements.
394
+
395
+ ### Persistence Summary
396
+
397
+ | Field | Set By | Storage Key | Auto-Attached | Cleared By |
398
+ | ----------------- | ------------------------ | --------------------------- | -------------------- | ----------------------------------------- |
399
+ | **userId** | `identify(userId)` | `metarouter:user_id` | All events | `reset()` |
400
+ | **anonymousId** | Auto-generated (UUID v4) | `metarouter:anonymous_id` | All events | `reset()` (new ID generated on next init) |
401
+ | **groupId** | `group(groupId)` | `metarouter:group_id` | All events after set | `reset()` |
402
+ | **advertisingId** | `setAdvertisingId(id)` | `metarouter:advertising_id` | Event context | `clearAdvertisingId()`, `reset()` |
403
+
404
+ ### Event Enrichment Flow
405
+
406
+ Every event you send (track, page, screen, group) is automatically enriched with persisted identity information:
407
+
408
+ ```js
409
+ // You call:
410
+ analytics.track("Button Clicked", { buttonName: "Submit" });
411
+
412
+ // SDK automatically adds:
413
+ {
414
+ "type": "track",
415
+ "event": "Button Clicked",
416
+ "properties": { "buttonName": "Submit" },
417
+ "userId": "employeeID", // ← Auto-added from storage
418
+ "anonymousId": "a1b2c3d4-...", // ← Auto-added from storage
419
+ "groupId": "company123", // ← Auto-added from storage (if set)
420
+ "timestamp": "2025-10-23T...",
421
+ "context": {
422
+ "device": {
423
+ "advertisingId": "..." // ← Auto-added from storage (if set)
424
+ }
425
+ }
426
+ }
427
+ ```
428
+
429
+ ### Resetting Identity
430
+
431
+ Call `reset()` to clear **all** identity data, typically when a user logs out:
432
+
433
+ ```js
434
+ await analytics.reset();
435
+ ```
436
+
437
+ **What `reset()` does:**
438
+
439
+ - Clears `userId`, `anonymousId`, `groupId`, and `advertisingId` from memory
440
+ - Removes all identity fields from AsyncStorage
441
+ - Stops background flush loops
442
+ - Clears event queue
443
+ - Next `init()` will generate a **new** `anonymousId`
444
+
445
+ **Common logout flow:**
446
+
447
+ ```js
448
+ // User logs out
449
+ await analytics.reset();
450
+
451
+ // User is now tracked with a new anonymousId (auto-generated on next event)
452
+ // No userId or groupId until they log in again
453
+ ```
454
+
455
+ ### Best Practices
456
+
457
+ 1. **On Login:** Call `identify()` immediately after successful authentication
458
+ 2. **On Logout:** Call `reset()` to clear user identity
459
+ 3. **Cross-Session Tracking:** The SDK handles this automatically - no action needed
460
+ 4. **Group Associations:** Set `groupId` after determining the user's organization/team
461
+ 5. **Pre-Login Tracking:** Events are tracked with `anonymousId` before login
462
+ 6. **Connecting Sessions:** Use `alias()` to connect pre-login and post-login activity
463
+
464
+ ### Example: Complete User Journey
465
+
466
+ ```js
467
+ // App starts - SDK initializes
468
+ const analytics = await createAnalyticsClient({...});
469
+ // anonymousId: "abc-123" (auto-generated and persisted)
470
+
471
+ // User browses before login
472
+ analytics.track("Product Viewed", { sku: "XYZ" });
473
+ // Includes: anonymousId: "abc-123"
474
+
475
+ // User logs in
476
+ analytics.identify("user456", { name: "John", email: "john@example.com" });
477
+ // userId: "user456" is now persisted
478
+
479
+ // User performs actions
480
+ analytics.track("Added to Cart", { sku: "XYZ" });
481
+ // Includes: userId: "user456", anonymousId: "abc-123"
482
+
483
+ // App closes and reopens...
484
+
485
+ // SDK auto-loads userId from storage
486
+ analytics.track("App Reopened");
487
+ // STILL includes: userId: "user456", anonymousId: "abc-123"
488
+
489
+ // User logs out
490
+ await analytics.reset();
491
+ // All IDs cleared, new anonymousId will be generated on next init
492
+ ```
493
+
494
+ ### Storage Location
495
+
496
+ All identity data is stored in **React Native AsyncStorage**, which provides:
497
+
498
+ - Persistent storage across app sessions
499
+ - Automatic data encryption on iOS (Keychain-backed)
500
+ - Secure local storage on Android
501
+ - Cleared only on app uninstall or explicit `reset()` call
502
+
503
+ ## Using the alias() Method
504
+
505
+ The `alias()` method connects an **anonymous user** (tracked by `anonymousId`) to a **known user ID**. It's used to link pre-login activity to post-login identity.
506
+
507
+ ### When to Use alias()
508
+
509
+ Use `alias()` when a user **signs up** or **logs in for the first time**, and you want to connect their pre-login browsing activity to their new account.
510
+
511
+ **Primary use case:** Connecting anonymous browsing sessions to newly created user accounts.
512
+
513
+ ### How It Works
514
+
515
+ ```js
516
+ analytics.alias(newUserId);
517
+ ```
518
+
519
+ This does two things:
520
+
521
+ 1. Sets the new `userId` (same as `identify()`)
522
+ 2. Sends an `alias` event to your analytics backend, telling it: "This anonymousId and this userId are the same person"
523
+
524
+ ### Example: User Sign-Up Flow
525
+
526
+ ```js
527
+ // App starts - user is anonymous
528
+ const analytics = await createAnalyticsClient({...});
529
+ // anonymousId: "abc-123" (auto-generated)
530
+
531
+ // User browses anonymously
532
+ analytics.track("Product Viewed", { productId: "XYZ" });
533
+ analytics.track("Add to Cart", { productId: "XYZ" });
534
+ // Both events tracked with anonymousId: "abc-123"
535
+
536
+ // User creates an account / signs up
537
+ analytics.alias("user-456");
538
+ // Sends alias event connecting: anonymousId "abc-123" → userId "user-456"
539
+
540
+ // Optionally add user traits
541
+ analytics.identify("user-456", {
542
+ name: "John Doe",
543
+ email: "john@example.com"
544
+ });
545
+
546
+ // Future events now tracked as authenticated user
547
+ analytics.track("Purchase Complete", { orderId: "789" });
548
+ // Event includes: userId: "user-456", anonymousId: "abc-123"
549
+ ```
550
+
551
+ ### alias() vs identify()
552
+
553
+ | Method | When to Use | What It Does |
554
+ | ---------------- | --------------------------------------------------------------- | -------------------------------------------------------------- |
555
+ | **`alias()`** | **First-time sign-up/login** when connecting anonymous activity | Sets userId + sends `alias` event to link anonymousId → userId |
556
+ | **`identify()`** | Subsequent logins or updating user traits | Sets userId + sends `identify` event with user traits |
557
+
558
+ ### Best Practices
559
+
560
+ 1. **First-time sign-up:** Call `alias()` to connect anonymous activity to the new account
561
+ 2. **Subsequent logins:** Use `identify()` - no need to alias again
562
+ 3. **Backend support:** Ensure your analytics backend supports alias events for merging user profiles
563
+ 4. **One-time operation:** You typically only need `alias()` once per user - when they first create an account
564
+
565
+ ### Real-World Example: E-Commerce App
566
+
567
+ ```js
568
+ // Day 1: Anonymous browsing
569
+ analytics.track("App Opened");
570
+ analytics.track("Product Viewed", { sku: "SHOE-123" });
571
+ analytics.track("Product Viewed", { sku: "SHIRT-456" });
572
+ // All tracked with anonymousId: "anon-xyz"
573
+
574
+ // User signs up
575
+ analytics.alias("user-789");
576
+ analytics.identify("user-789", {
577
+ name: "Jane Doe",
578
+ email: "jane@example.com",
579
+ });
580
+
581
+ // User continues shopping (now authenticated)
582
+ analytics.track("Added to Cart", { sku: "SHIRT-456" });
583
+ analytics.track("Purchase", { total: 49.99 });
584
+
585
+ // Your analytics platform can now show the complete customer journey:
586
+ // - Pre-signup activity (anonymous product views)
587
+ // - Post-signup activity (cart additions, purchase)
588
+ // - Full conversion funnel from anonymous → identified → converted
589
+ ```
590
+
271
591
  ## Advertising ID (IDFA/GAID)
272
592
 
273
593
  The SDK supports including advertising identifiers (IDFA on iOS, GAID on Android) in event context for ad tracking and attribution purposes.
@@ -316,8 +636,8 @@ Once set, the `advertisingId` will be automatically included in the device conte
316
636
  > **Note:** The examples below use third-party libraries for demonstration purposes. You should choose appropriate packages that fit your project's needs and are actively maintained.
317
637
 
318
638
  ```js
319
- import { AppTrackingTransparency } from 'react-native-tracking-transparency';
320
- import { getAdvertisingId } from '@react-native-community/google-advertiser-id'; // or similar library
639
+ import { AppTrackingTransparency } from "react-native-tracking-transparency";
640
+ import { getAdvertisingId } from "@react-native-community/google-advertiser-id"; // or similar library
321
641
 
322
642
  // Initialize analytics first
323
643
  const analytics = await createAnalyticsClient({
@@ -326,9 +646,10 @@ const analytics = await createAnalyticsClient({
326
646
  });
327
647
 
328
648
  // Request tracking permission
329
- const trackingStatus = await AppTrackingTransparency.requestTrackingAuthorization();
649
+ const trackingStatus =
650
+ await AppTrackingTransparency.requestTrackingAuthorization();
330
651
 
331
- if (trackingStatus === 'authorized') {
652
+ if (trackingStatus === "authorized") {
332
653
  // Get and set IDFA only if authorized
333
654
  const advertisingId = await getAdvertisingId();
334
655
  await analytics.setAdvertisingId(advertisingId);
@@ -338,7 +659,7 @@ if (trackingStatus === 'authorized') {
338
659
  ### Android Example
339
660
 
340
661
  ```js
341
- import { getAdvertisingId } from '@react-native-community/google-advertiser-id'; // or similar library
662
+ import { getAdvertisingId } from "@react-native-community/google-advertiser-id"; // or similar library
342
663
 
343
664
  // Initialize analytics first
344
665
  const analytics = await createAnalyticsClient({
@@ -371,6 +692,7 @@ analytics.track("Event After Opt Out");
371
692
  ### Validation
372
693
 
373
694
  The SDK validates advertising IDs before setting them:
695
+
374
696
  - Must be a non-empty string
375
697
  - Cannot be only whitespace
376
698
  - Invalid values are rejected and logged as warnings
@@ -20,6 +20,7 @@ export declare class MetaRouterAnalyticsClient {
20
20
  private static readonly MAX_QUEUE_SIZE;
21
21
  private maxQueueEvents;
22
22
  private dispatcher;
23
+ private tracingEnabled;
23
24
  /**
24
25
  * Initializes the analytics client with the provided options.
25
26
  * @param options - The initialization options.
@@ -121,6 +122,19 @@ export declare class MetaRouterAnalyticsClient {
121
122
  * their advertising ID without performing a full analytics reset.
122
123
  */
123
124
  clearAdvertisingId(): Promise<void>;
125
+ /**
126
+ * Enable or disable tracing headers on outgoing requests.
127
+ * When enabled, a "Trace: true" header is included in all API calls to the cluster.
128
+ * This is useful for debugging and troubleshooting request flows.
129
+ *
130
+ * @param enabled - Whether to enable tracing headers
131
+ */
132
+ setTracing(enabled: boolean): void;
133
+ /**
134
+ * Returns whether tracing is currently enabled.
135
+ * @returns True if tracing is enabled
136
+ */
137
+ isTracingEnabled(): boolean;
124
138
  /**
125
139
  * Enable debug logging for troubleshooting
126
140
  */
@@ -142,6 +156,7 @@ export declare class MetaRouterAnalyticsClient {
142
156
  circuitState: import("./utils/circuitBreaker").CircuitState;
143
157
  circuitRemainingMs: number;
144
158
  maxQueueEvents: number;
159
+ tracingEnabled: boolean;
145
160
  }>;
146
161
  /**
147
162
  * Flushes the event queue to the ingestion endpoint in chunks.
@@ -1 +1 @@
1
- {"version":3,"file":"MetaRouterAnalyticsClient.d.ts","sourceRoot":"","sources":["../../src/analytics/MetaRouterAnalyticsClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAU7E;;;;;;GAMG;AACH,qBAAa,yBAAyB;IACpC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,KAAK,CAAsB;IACnC,OAAO,CAAC,oBAAoB,CAAM;IAClC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,QAAQ,CAAyC;IACzD,OAAO,CAAC,oBAAoB,CAAwC;IACpE,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAM;IAC5C,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,UAAU,CAAc;IAEhC;;;OAGG;gBACS,OAAO,EAAE,WAAW;IA+EhC;;;OAGG;IACU,IAAI;IAsDjB,OAAO,CAAC,QAAQ;IAIhB;;OAEG;IACH,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,OAAO;IAIf;;;;;;OAMG;YACW,gBAAgB;IAe9B;;;OAGG;IACH,OAAO,CAAC,GAAG;IAIX;;;OAGG;IACH,OAAO,CAAC,OAAO;IAgBf,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,cAAc;IAItB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAO7B;;;OAGG;IACH,OAAO,CAAC,oBAAoB,CAW1B;IAEF;;;;OAIG;IACH,KAAK,CAAC,KAAK,EAAE,MAA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AG,CAAC;IAWrD;;;;OAIG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM;IAOvB;;;;;;;;;OASG;IACG,gBAAgB,CAAC,aAAa,EAAE,MAAM;IAkB5C;;;;;;OAMG;IACG,kBAAkB;IAaxB;;;;;;OAMG;IACH,UAAU,CAAC,OAAO,EAAE,OAAO;IAK3B;;;OAGG;IACH,gBAAgB,IAAI,OAAO;IAI3B;;OAEG;IACH,kBAAkB;IAKlB;;OAEG;IACG,YAAY;;;;;;;;;;;;;;;;IAoBlB;;;OAGG;IACG,KAAK;IAIX;;OAEG;IACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CA4BpC"}
@@ -27,6 +27,7 @@ export class MetaRouterAnalyticsClient {
27
27
  this.appState = AppState.currentState;
28
28
  this.appStateSubscription = null;
29
29
  this.maxQueueEvents = 2000;
30
+ this.tracingEnabled = false;
30
31
  /**
31
32
  * Handles the app state change event.
32
33
  * @param nextState - The new app state.
@@ -77,6 +78,7 @@ export class MetaRouterAnalyticsClient {
77
78
  fetchWithTimeout: (url, init, timeoutMs) => this.fetchWithTimeout(url, init, timeoutMs),
78
79
  canSend: () => this.lifecycle === "ready" && !!this.identityManager.getAnonymousId(),
79
80
  isOperational: () => this.lifecycle === "ready",
81
+ isTracingEnabled: () => this.tracingEnabled,
80
82
  createBreaker: () => new CircuitBreaker({
81
83
  failureThreshold: 3,
82
84
  cooldownMs: 10000,
@@ -330,6 +332,24 @@ export class MetaRouterAnalyticsClient {
330
332
  this.context = await getContextInfo();
331
333
  log("Advertising ID cleared from storage and context");
332
334
  }
335
+ /**
336
+ * Enable or disable tracing headers on outgoing requests.
337
+ * When enabled, a "Trace: true" header is included in all API calls to the cluster.
338
+ * This is useful for debugging and troubleshooting request flows.
339
+ *
340
+ * @param enabled - Whether to enable tracing headers
341
+ */
342
+ setTracing(enabled) {
343
+ log(`Tracing ${enabled ? 'enabled' : 'disabled'}`);
344
+ this.tracingEnabled = enabled;
345
+ }
346
+ /**
347
+ * Returns whether tracing is currently enabled.
348
+ * @returns True if tracing is enabled
349
+ */
350
+ isTracingEnabled() {
351
+ return this.tracingEnabled;
352
+ }
333
353
  /**
334
354
  * Enable debug logging for troubleshooting
335
355
  */
@@ -356,6 +376,7 @@ export class MetaRouterAnalyticsClient {
356
376
  circuitState: d.circuitState,
357
377
  circuitRemainingMs: d.circuitRemainingMs,
358
378
  maxQueueEvents: d.maxQueueEvents,
379
+ tracingEnabled: this.tracingEnabled,
359
380
  };
360
381
  }
361
382
  /**
@@ -10,6 +10,7 @@ export interface DispatcherOptions {
10
10
  fetchWithTimeout: (url: string, init: RequestInit, timeoutMs: number) => Promise<Response>;
11
11
  canSend: () => boolean;
12
12
  isOperational: () => boolean;
13
+ isTracingEnabled: () => boolean;
13
14
  createBreaker: () => CircuitBreaker;
14
15
  log: (...args: any[]) => void;
15
16
  warn: (...args: any[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../src/analytics/dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AAEzD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;AAE3D,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAE7B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,gBAAgB,EAAE,CAChB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,MAAM,KACd,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvB,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,aAAa,EAAE,MAAM,OAAO,CAAC;IAC7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AiB;gBAEpB,IAAI,EAAE,iBAAiB;IAMnC,WAAW,IAAI,YAAY,EAAE;IAI7B,KAAK,IAAI,IAAI;IAQb,IAAI,IAAI,IAAI;IAQZ,KAAK,IAAI,IAAI;IAOb,OAAO,CAAC,cAAc;IAQtB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAejC,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAuBlC,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,eAAe;IAQjB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA2J5B,YAAY;;;;;;;;;;CAYb"}
@@ -106,9 +106,15 @@ export default class Dispatcher {
106
106
  const chunk = this.drainBatch();
107
107
  try {
108
108
  this.opts.log("Making API call to:", this.opts.endpoint("/v1/batch"));
109
+ const headers = {
110
+ "Content-Type": "application/json"
111
+ };
112
+ if (this.opts.isTracingEnabled()) {
113
+ headers["Trace"] = "true";
114
+ }
109
115
  const res = await this.opts.fetchWithTimeout(this.opts.endpoint("/v1/batch"), {
110
116
  method: "POST",
111
- headers: { "Content-Type": "application/json" },
117
+ headers,
112
118
  body: JSON.stringify({ batch: chunk }),
113
119
  }, 8000);
114
120
  if (!res.ok) {
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/analytics/init.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK/D,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GACnB,kBAAkB,CA2BpB"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/analytics/init.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK/D,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GACnB,kBAAkB,CA4BpB"}
@@ -16,6 +16,7 @@ export function createAnalyticsClient(options) {
16
16
  alias: (newUserId) => instance.alias(newUserId),
17
17
  setAdvertisingId: (advertisingId) => instance.setAdvertisingId(advertisingId),
18
18
  clearAdvertisingId: () => instance.clearAdvertisingId(),
19
+ setTracing: (enabled) => instance.setTracing(enabled),
19
20
  enableDebugLogging: () => instance.enableDebugLogging(),
20
21
  getDebugInfo: () => instance.getDebugInfo(),
21
22
  flush: () => instance.flush(),
@@ -1 +1 @@
1
- {"version":3,"file":"proxyClient.d.ts","sourceRoot":"","sources":["../../../src/analytics/proxy/proxyClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AA8InD,eAAO,MAAM,WAAW,EAAE,kBAczB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,kBAAkB,GAAG,IAAI,EACjC,IAAI,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,QAqBjC"}
1
+ {"version":3,"file":"proxyClient.d.ts","sourceRoot":"","sources":["../../../src/analytics/proxy/proxyClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AA8InD,eAAO,MAAM,WAAW,EAAE,kBAezB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,kBAAkB,GAAG,IAAI,EACjC,IAAI,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,QAqBjC"}
@@ -115,6 +115,7 @@ export const proxyClient = {
115
115
  alias: (newUserId) => handleMethodCall("alias", newUserId),
116
116
  setAdvertisingId: (advertisingId) => handleMethodCall("setAdvertisingId", advertisingId),
117
117
  clearAdvertisingId: () => handleMethodCall("clearAdvertisingId"),
118
+ setTracing: (enabled) => handleMethodCall("setTracing", enabled),
118
119
  flush: () => handleMethodCall("flush"),
119
120
  reset: () => handleMethodCall("reset"),
120
121
  enableDebugLogging: () => handleMethodCall("enableDebugLogging"),
@@ -33,6 +33,7 @@ export interface AnalyticsInterface {
33
33
  alias: (newUserId: string) => void;
34
34
  setAdvertisingId: (advertisingId: string) => Promise<void>;
35
35
  clearAdvertisingId: () => Promise<void>;
36
+ setTracing: (enabled: boolean) => void;
36
37
  flush: () => Promise<void>;
37
38
  reset: () => Promise<void>;
38
39
  enableDebugLogging: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/analytics/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,UAAU,GACV,OAAO,GACP,QAAQ,GACR,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAA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,MAAM,CAAC;KACnB,CAAC;IACF,MAAM,EAAE;QACN,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,EAAE,EAAE;QACF,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE;QACR,IAAI,EAAE,OAAO,CAAC;KACf,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,cAAc,GACd,OAAO,GACP,WAAW,GACX,UAAU,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/analytics/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,UAAU,GACV,OAAO,GACP,QAAQ,GACR,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,SAA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OAAO,GACP,WAAW,GACX,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/react-native-sdk",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "exports": {