@datalyr/react-native 1.7.3 → 1.7.4
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 +2 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,6 @@ Mobile analytics and attribution SDK for React Native and Expo. Track events, id
|
|
|
12
12
|
- [Custom Events](#custom-events)
|
|
13
13
|
- [Screen Views](#screen-views)
|
|
14
14
|
- [E-Commerce Events](#e-commerce-events)
|
|
15
|
-
- [Revenue Events](#revenue-events)
|
|
16
15
|
- [User Identity](#user-identity)
|
|
17
16
|
- [Anonymous ID](#anonymous-id)
|
|
18
17
|
- [Identifying Users](#identifying-users)
|
|
@@ -181,8 +180,7 @@ await Datalyr.initialize({
|
|
|
181
180
|
interface AutoEventConfig {
|
|
182
181
|
trackSessions?: boolean; // Track session_start / session_end (default: true)
|
|
183
182
|
trackScreenViews?: boolean; // Enable screen view events via screen() (default: true)
|
|
184
|
-
|
|
185
|
-
trackPerformance?: boolean; // Track performance metrics (default: false)
|
|
183
|
+
trackAppInstall?: boolean; // Track app_install on first open (default: true)
|
|
186
184
|
sessionTimeoutMs?: number; // Session timeout in ms
|
|
187
185
|
}
|
|
188
186
|
```
|
|
@@ -271,25 +269,7 @@ await Datalyr.trackAddPaymentInfo(true);
|
|
|
271
269
|
|
|
272
270
|
### Revenue Events
|
|
273
271
|
|
|
274
|
-
> **Important:** If you use **Superwall** or **RevenueCat**, do not
|
|
275
|
-
|
|
276
|
-
Track revenue with automatic SKAdNetwork encoding:
|
|
277
|
-
|
|
278
|
-
```typescript
|
|
279
|
-
await Datalyr.trackRevenue('in_app_purchase', {
|
|
280
|
-
value: 4.99,
|
|
281
|
-
currency: 'USD',
|
|
282
|
-
product_id: 'gems_500',
|
|
283
|
-
});
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### App Update Tracking
|
|
287
|
-
|
|
288
|
-
Manually track version changes:
|
|
289
|
-
|
|
290
|
-
```typescript
|
|
291
|
-
await Datalyr.trackAppUpdate('1.0.0', '1.1.0');
|
|
292
|
-
```
|
|
272
|
+
> **Important:** If you use **Superwall** or **RevenueCat**, do not track revenue client-side. Use the [Superwall](https://docs.datalyr.com/integrations/superwall) or [RevenueCat](https://docs.datalyr.com/integrations/revenuecat) webhook integration instead — they only fire when real money changes hands. Use the SDK for behavioral events only (`track('paywall_view')`, `track('trial_start')`, `screen()`, `identify()`, etc.).
|
|
293
273
|
|
|
294
274
|
---
|
|
295
275
|
|
|
@@ -636,10 +616,6 @@ await Datalyr.initialize({
|
|
|
636
616
|
| Event | Trigger |
|
|
637
617
|
|-------|---------|
|
|
638
618
|
| `app_install` | First app open |
|
|
639
|
-
| `app_open` | App launch |
|
|
640
|
-
| `app_background` | App enters background |
|
|
641
|
-
| `app_foreground` | App returns to foreground |
|
|
642
|
-
| `app_update` | App version changes |
|
|
643
619
|
| `session_start` | New session begins |
|
|
644
620
|
| `session_end` | Session expires (30 min inactivity) |
|
|
645
621
|
|
|
@@ -1120,7 +1096,6 @@ All methods are static on the `Datalyr` class unless noted otherwise.
|
|
|
1120
1096
|
| `trackWithSKAdNetwork(event, properties?)` | Track event with SKAN conversion value encoding |
|
|
1121
1097
|
| `trackPurchase(value, currency?, productId?)` | Track a purchase |
|
|
1122
1098
|
| `trackSubscription(value, currency?, plan?)` | Track a subscription |
|
|
1123
|
-
| `trackRevenue(eventName, properties?)` | Track a revenue event |
|
|
1124
1099
|
| `trackAddToCart(value, currency?, productId?, productName?)` | Track add-to-cart |
|
|
1125
1100
|
| `trackViewContent(contentId?, contentName?, contentType?, value?, currency?)` | Track content view |
|
|
1126
1101
|
| `trackInitiateCheckout(value, currency?, numItems?, productIds?)` | Track checkout start |
|
|
@@ -1128,7 +1103,6 @@ All methods are static on the `Datalyr` class unless noted otherwise.
|
|
|
1128
1103
|
| `trackSearch(query, resultIds?)` | Track a search |
|
|
1129
1104
|
| `trackLead(value?, currency?)` | Track a lead |
|
|
1130
1105
|
| `trackAddPaymentInfo(success?)` | Track payment info added |
|
|
1131
|
-
| `trackAppUpdate(previousVersion, currentVersion)` | Track an app version update |
|
|
1132
1106
|
|
|
1133
1107
|
### User Identity
|
|
1134
1108
|
|
package/package.json
CHANGED