@datalyr/react-native 1.0.3 โ 1.0.5
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/EXPO_INSTALL.md +37 -38
- package/INSTALL.md +25 -48
- package/README.md +13 -16
- package/examples/attribution-example.tsx +1 -1
- package/examples/auto-events-example.tsx +1 -1
- package/examples/example.tsx +1 -1
- package/lib/http-client.js +2 -1
- package/package.json +1 -1
- package/src/http-client.ts +2 -1
- package/DEBUG_WHITE_SCREEN.md +0 -234
- package/FRAMEWORK_COMPARISON.md +0 -178
- package/SDK_COMPLETION_STATUS.md +0 -206
package/EXPO_INSTALL.md
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
# Datalyr Expo SDK - Installation Guide
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Expo Compatibility
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The Datalyr SDK works with all Expo workflows:
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
- โ **Expo Go** - Limited compatibility due to native dependencies
|
|
7
|
+
- **Expo Bare Workflow** - Full compatibility (use regular React Native SDK)
|
|
8
|
+
- **Expo Managed Workflow** - Requires Expo-specific setup (this guide)
|
|
9
|
+
- **Expo Go** - Limited compatibility due to native dependencies
|
|
11
10
|
|
|
12
|
-
##
|
|
11
|
+
## Quick Setup for Expo Managed Workflow
|
|
13
12
|
|
|
14
13
|
### 1. Install Expo Dependencies
|
|
15
14
|
|
|
@@ -131,7 +130,7 @@ const App: React.FC = () => {
|
|
|
131
130
|
export default App;
|
|
132
131
|
```
|
|
133
132
|
|
|
134
|
-
##
|
|
133
|
+
## Expo vs React Native CLI Differences
|
|
135
134
|
|
|
136
135
|
| Feature | React Native CLI | Expo Managed | Expo Bare |
|
|
137
136
|
|---------|------------------|--------------|-----------|
|
|
@@ -142,7 +141,7 @@ export default App;
|
|
|
142
141
|
| Attribution | Full support โ
| Full support โ
| Full support โ
|
|
|
143
142
|
| Auto Events | Full support โ
| Full support โ
| Full support โ
|
|
|
144
143
|
|
|
145
|
-
##
|
|
144
|
+
## Expo-Specific Features
|
|
146
145
|
|
|
147
146
|
### 1. Device Information
|
|
148
147
|
```typescript
|
|
@@ -186,7 +185,7 @@ const getNetworkType = async () => {
|
|
|
186
185
|
};
|
|
187
186
|
```
|
|
188
187
|
|
|
189
|
-
##
|
|
188
|
+
## Attribution Setup for Expo
|
|
190
189
|
|
|
191
190
|
Deep links work the same way, but configuration is in `app.json`:
|
|
192
191
|
|
|
@@ -205,7 +204,7 @@ const tiktokUrl = 'yourappscheme://open?utm_source=tiktok&utm_campaign=viral_vid
|
|
|
205
204
|
const googleUrl = 'yourappscheme://open?utm_source=google&utm_campaign=brand_search&gclid=google456def';
|
|
206
205
|
```
|
|
207
206
|
|
|
208
|
-
##
|
|
207
|
+
## Testing with Expo
|
|
209
208
|
|
|
210
209
|
### Development
|
|
211
210
|
```bash
|
|
@@ -228,23 +227,23 @@ eas submit --platform ios
|
|
|
228
227
|
eas submit --platform android
|
|
229
228
|
```
|
|
230
229
|
|
|
231
|
-
##
|
|
230
|
+
## Expo Limitations
|
|
232
231
|
|
|
233
|
-
### What Works
|
|
234
|
-
-
|
|
235
|
-
-
|
|
236
|
-
-
|
|
237
|
-
-
|
|
238
|
-
-
|
|
239
|
-
-
|
|
232
|
+
### What Works:
|
|
233
|
+
- Event tracking and attribution
|
|
234
|
+
- Session management
|
|
235
|
+
- Screen view tracking
|
|
236
|
+
- App lifecycle events
|
|
237
|
+
- Deep link attribution
|
|
238
|
+
- Basic device fingerprinting
|
|
240
239
|
|
|
241
|
-
###
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
-
-
|
|
245
|
-
-
|
|
240
|
+
### Limitations:
|
|
241
|
+
- **IDFA/GAID Collection** - Requires additional setup
|
|
242
|
+
- **Advanced Device Info** - Some properties not available in managed workflow
|
|
243
|
+
- **Carrier Information** - Not available in managed workflow
|
|
244
|
+
- **Custom Native Modules** - Not available in managed workflow
|
|
246
245
|
|
|
247
|
-
##
|
|
246
|
+
## Recommended Setup
|
|
248
247
|
|
|
249
248
|
### For Maximum Compatibility:
|
|
250
249
|
1. **Use Expo Bare Workflow** - Get full React Native CLI features
|
|
@@ -255,24 +254,24 @@ eas submit --platform android
|
|
|
255
254
|
2. **Core attribution still works** - LYR tags, UTM params, click IDs
|
|
256
255
|
3. **Automatic events work fully** - Sessions, screen views, app lifecycle
|
|
257
256
|
|
|
258
|
-
##
|
|
257
|
+
## Expected Events in Dashboard
|
|
259
258
|
|
|
260
259
|
Events will appear in your Datalyr dashboard with `source: 'mobile_app'`:
|
|
261
260
|
|
|
262
|
-
|
|
263
|
-
- `session_start` - New user session
|
|
264
|
-
- `session_end` - Session ended with stats
|
|
265
|
-
- `pageviews` - Screen navigation
|
|
266
|
-
- `app_install` - First app launch with attribution
|
|
267
|
-
- `app_update` - App version changes
|
|
268
|
-
- `app_foreground`/`app_background` - App lifecycle
|
|
269
|
-
- `sdk_initialized` - SDK setup complete
|
|
261
|
+
**Automatic Events:**
|
|
262
|
+
- `session_start` - New user session
|
|
263
|
+
- `session_end` - Session ended with stats
|
|
264
|
+
- `pageviews` - Screen navigation
|
|
265
|
+
- `app_install` - First app launch with attribution
|
|
266
|
+
- `app_update` - App version changes
|
|
267
|
+
- `app_foreground`/`app_background` - App lifecycle
|
|
268
|
+
- `sdk_initialized` - SDK setup complete
|
|
270
269
|
|
|
271
|
-
|
|
270
|
+
**Manual Events:**
|
|
272
271
|
- Custom events from `datalyr.track()`
|
|
273
272
|
- User identification from `datalyr.identify()`
|
|
274
273
|
|
|
275
|
-
##
|
|
274
|
+
## Choosing Between Expo and React Native CLI
|
|
276
275
|
|
|
277
276
|
### Choose **React Native CLI** if:
|
|
278
277
|
- You need full IDFA/GAID support
|
|
@@ -293,6 +292,6 @@ Events will appear in your Datalyr dashboard with `source: 'mobile_app'`:
|
|
|
293
292
|
|
|
294
293
|
---
|
|
295
294
|
|
|
296
|
-
|
|
295
|
+
**Ready to test?** Your Expo app with automatic attribution is ready!
|
|
297
296
|
|
|
298
|
-
|
|
297
|
+
The SDK provides 90% of the attribution value even with Expo's managed workflow limitations.
|
package/INSTALL.md
CHANGED
|
@@ -1,33 +1,22 @@
|
|
|
1
|
-
# Datalyr React Native SDK -
|
|
1
|
+
# Datalyr React Native SDK - Installation Guide
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Key Features
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- โ
**Deep Link Support** - Extract attribution from app launches
|
|
12
|
-
- โ
**Privacy Compliant** - GDPR/CCPA support with opt-out options
|
|
5
|
+
- **Complete Attribution** - Track users from ad click to conversion
|
|
6
|
+
- **Automatic Events** - Sessions, screen views, app lifecycle
|
|
7
|
+
- **SKAdNetwork Support** - iOS 14+ attribution
|
|
8
|
+
- **Offline Support** - Queue events when offline
|
|
9
|
+
- **Deep Link Support** - Extract attribution from app launches
|
|
10
|
+
- **Privacy Compliant** - GDPR/CCPA support
|
|
13
11
|
|
|
14
|
-
##
|
|
12
|
+
## Quick Setup
|
|
15
13
|
|
|
16
|
-
### 1. Install
|
|
14
|
+
### 1. Install Package
|
|
17
15
|
|
|
18
16
|
```bash
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# Install required dependencies
|
|
23
|
-
npm install @react-native-async-storage/async-storage @react-native-community/netinfo react-native-device-info react-native-get-random-values react-native-idfa uuid
|
|
24
|
-
# or with yarn
|
|
25
|
-
yarn add @react-native-async-storage/async-storage @react-native-community/netinfo react-native-device-info react-native-get-random-values react-native-idfa uuid
|
|
26
|
-
|
|
27
|
-
# Install dev dependencies
|
|
28
|
-
npm install --save-dev @types/uuid
|
|
29
|
-
# or with yarn
|
|
30
|
-
yarn add --dev @types/uuid
|
|
17
|
+
npm install @datalyr/react-native
|
|
18
|
+
# or
|
|
19
|
+
yarn add @datalyr/react-native
|
|
31
20
|
```
|
|
32
21
|
|
|
33
22
|
### 2. iOS Setup (if targeting iOS)
|
|
@@ -36,19 +25,7 @@ yarn add --dev @types/uuid
|
|
|
36
25
|
cd ios && pod install && cd ..
|
|
37
26
|
```
|
|
38
27
|
|
|
39
|
-
### 3.
|
|
40
|
-
|
|
41
|
-
For now, copy the SDK files directly into your project:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# Create SDK directory
|
|
45
|
-
mkdir -p src/datalyr-sdk
|
|
46
|
-
|
|
47
|
-
# Copy SDK files
|
|
48
|
-
cp -r docs/mobile/react-native/src/* src/datalyr-sdk/
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### 4. Initialize in Your App
|
|
28
|
+
### 3. Initialize in Your App
|
|
52
29
|
|
|
53
30
|
**Basic Setup:**
|
|
54
31
|
```typescript
|
|
@@ -90,7 +67,7 @@ const App: React.FC = () => {
|
|
|
90
67
|
};
|
|
91
68
|
```
|
|
92
69
|
|
|
93
|
-
|
|
70
|
+
**SKAdNetwork Setup (iOS 14+ Attribution):**
|
|
94
71
|
```typescript
|
|
95
72
|
// For iOS attribution competing with AppsFlyer/Adjust
|
|
96
73
|
import React, { useEffect } from 'react';
|
|
@@ -148,7 +125,7 @@ const testTracking = async () => {
|
|
|
148
125
|
};
|
|
149
126
|
```
|
|
150
127
|
|
|
151
|
-
##
|
|
128
|
+
## Configuration Options
|
|
152
129
|
|
|
153
130
|
```typescript
|
|
154
131
|
await datalyr.initialize({
|
|
@@ -176,13 +153,13 @@ await datalyr.initialize({
|
|
|
176
153
|
});
|
|
177
154
|
```
|
|
178
155
|
|
|
179
|
-
##
|
|
156
|
+
## Platform Requirements
|
|
180
157
|
|
|
181
158
|
- **React Native**: >= 0.60.0
|
|
182
159
|
- **iOS**: >= 11.0
|
|
183
160
|
- **Android**: >= API level 21
|
|
184
161
|
|
|
185
|
-
##
|
|
162
|
+
## Framework Compatibility
|
|
186
163
|
|
|
187
164
|
| Framework | Compatibility | Install Guide |
|
|
188
165
|
|-----------|---------------|---------------|
|
|
@@ -195,7 +172,7 @@ await datalyr.initialize({
|
|
|
195
172
|
|
|
196
173
|
**๐ For Expo users:** See [EXPO_INSTALL.md](./EXPO_INSTALL.md) for Expo-specific setup instructions.
|
|
197
174
|
|
|
198
|
-
##
|
|
175
|
+
## Setting Up Attribution
|
|
199
176
|
|
|
200
177
|
### 1. Configure Deep Links
|
|
201
178
|
|
|
@@ -267,7 +244,7 @@ Expected output:
|
|
|
267
244
|
*/
|
|
268
245
|
```
|
|
269
246
|
|
|
270
|
-
##
|
|
247
|
+
## Testing Events
|
|
271
248
|
|
|
272
249
|
After setup, events will appear in your Datalyr dashboard at:
|
|
273
250
|
`https://app.datalyr.com/dashboard/ozLZblQ8hN`
|
|
@@ -292,7 +269,7 @@ Look for events with `source: 'mobile_app'` to confirm mobile tracking is workin
|
|
|
292
269
|
- User identification with `datalyr.identify()`
|
|
293
270
|
- Manual screen views with `datalyr.screen()`
|
|
294
271
|
|
|
295
|
-
##
|
|
272
|
+
## Debugging
|
|
296
273
|
|
|
297
274
|
```typescript
|
|
298
275
|
// Check SDK status
|
|
@@ -309,14 +286,14 @@ await datalyr.initialize({
|
|
|
309
286
|
});
|
|
310
287
|
```
|
|
311
288
|
|
|
312
|
-
##
|
|
289
|
+
## Common Issues
|
|
313
290
|
|
|
314
291
|
1. **Events not appearing**: Check debug logs and network connectivity
|
|
315
292
|
2. **Build errors**: Ensure all dependencies are installed and linked
|
|
316
293
|
3. **iOS build issues**: Run `cd ios && pod install`
|
|
317
294
|
4. **Android issues**: Check that your minSdkVersion is >= 21
|
|
318
295
|
|
|
319
|
-
##
|
|
296
|
+
## Automatic Events
|
|
320
297
|
|
|
321
298
|
Want to see all the automatic events in action? Check out `auto-events-example.tsx` for a live demo that shows:
|
|
322
299
|
|
|
@@ -343,7 +320,7 @@ await datalyr.trackRevenue('purchase', {
|
|
|
343
320
|
await datalyr.endSession();
|
|
344
321
|
```
|
|
345
322
|
|
|
346
|
-
##
|
|
323
|
+
## Next Steps
|
|
347
324
|
|
|
348
325
|
- See `example.tsx` for basic integration example
|
|
349
326
|
- See `auto-events-example.tsx` for automatic events demo
|
|
@@ -353,7 +330,7 @@ await datalyr.endSession();
|
|
|
353
330
|
|
|
354
331
|
---
|
|
355
332
|
|
|
356
|
-
##
|
|
333
|
+
## SKAdNetwork Setup (iOS Attribution)
|
|
357
334
|
|
|
358
335
|
### **1. Add Native Bridge (React Native CLI/Expo Bare)**
|
|
359
336
|
|
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# @datalyr/react-native
|
|
2
2
|
|
|
3
|
-
Official Datalyr SDK for React Native & Expo -
|
|
3
|
+
Official Datalyr SDK for React Native & Expo - Mobile attribution tracking and analytics.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@datalyr/react-native)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
8
|
## Features
|
|
9
9
|
|
|
10
|
-
-
|
|
10
|
+
- ๐ฏ **Complete Attribution** - Track users from ad click to conversion
|
|
11
11
|
- ๐ฑ **React Native & Expo** - Works with both platforms
|
|
12
|
-
-
|
|
12
|
+
- ๐ **Automatic Events** - Session tracking, screen views, app lifecycle
|
|
13
13
|
- ๐ **SKAdNetwork** - iOS 14+ attribution support
|
|
14
|
-
- ๐พ **Offline
|
|
15
|
-
-
|
|
16
|
-
- โก **
|
|
14
|
+
- ๐พ **Offline Support** - Events saved and retried when reconnected
|
|
15
|
+
- ๐ **Privacy First** - GDPR/CCPA compliant
|
|
16
|
+
- โก **Lightweight** - < 100KB, minimal battery impact
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
@@ -23,19 +23,16 @@ npm install @datalyr/react-native
|
|
|
23
23
|
yarn add @datalyr/react-native
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
### Additional Dependencies
|
|
27
|
-
|
|
28
|
-
For device information and attribution:
|
|
29
|
-
```bash
|
|
30
|
-
npm install react-native-device-info @react-native-async-storage/async-storage
|
|
31
|
-
```
|
|
32
|
-
|
|
33
26
|
### iOS Setup
|
|
34
27
|
|
|
35
28
|
```bash
|
|
36
29
|
cd ios && pod install
|
|
37
30
|
```
|
|
38
31
|
|
|
32
|
+
### Expo Users
|
|
33
|
+
|
|
34
|
+
See [EXPO_INSTALL.md](./EXPO_INSTALL.md) for Expo-specific setup instructions.
|
|
35
|
+
|
|
39
36
|
## Quick Start
|
|
40
37
|
|
|
41
38
|
```typescript
|
|
@@ -44,9 +41,9 @@ import { Datalyr } from '@datalyr/react-native';
|
|
|
44
41
|
// Initialize SDK
|
|
45
42
|
await Datalyr.initialize({
|
|
46
43
|
apiKey: 'dk_your_api_key', // Required - get from Datalyr dashboard
|
|
47
|
-
debug: true, // Enable debug logs
|
|
48
|
-
enableAutoEvents: true, // Track sessions, app lifecycle
|
|
49
|
-
enableAttribution: true, // Track attribution data
|
|
44
|
+
debug: true, // Enable debug logs in development
|
|
45
|
+
enableAutoEvents: true, // Track sessions, screen views, app lifecycle
|
|
46
|
+
enableAttribution: true, // Track attribution data from ads
|
|
50
47
|
});
|
|
51
48
|
|
|
52
49
|
// Track custom event
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
TextInput,
|
|
17
17
|
Linking,
|
|
18
18
|
} from 'react-native';
|
|
19
|
-
import { datalyr } from '@datalyr/react-native
|
|
19
|
+
import { datalyr } from '@datalyr/react-native';
|
|
20
20
|
|
|
21
21
|
const AttributionExample: React.FC = () => {
|
|
22
22
|
const [attributionData, setAttributionData] = useState<any>(null);
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
AppState,
|
|
10
10
|
SafeAreaView,
|
|
11
11
|
} from 'react-native';
|
|
12
|
-
import { datalyr } from '@datalyr/react-native
|
|
12
|
+
import { datalyr } from '@datalyr/react-native';
|
|
13
13
|
|
|
14
14
|
// This example demonstrates all automatic events (like Mixpanel)
|
|
15
15
|
export default function AutoEventsExample() {
|
package/examples/example.tsx
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
ScrollView,
|
|
16
16
|
StatusBar,
|
|
17
17
|
} from 'react-native';
|
|
18
|
-
import { datalyr } from '@datalyr/react-native
|
|
18
|
+
import { datalyr } from '@datalyr/react-native';
|
|
19
19
|
|
|
20
20
|
const App: React.FC = () => {
|
|
21
21
|
const [sdkStatus, setSdkStatus] = useState<any>(null);
|
package/lib/http-client.js
CHANGED
|
@@ -152,7 +152,8 @@ export class HttpClient {
|
|
|
152
152
|
},
|
|
153
153
|
context: {
|
|
154
154
|
library: '@datalyr/react-native',
|
|
155
|
-
version: '1.0.
|
|
155
|
+
version: '1.0.5',
|
|
156
|
+
source: 'mobile_app', // Explicitly set source for mobile
|
|
156
157
|
userProperties: payload.userProperties,
|
|
157
158
|
},
|
|
158
159
|
timestamp: payload.timestamp,
|
package/package.json
CHANGED
package/src/http-client.ts
CHANGED
|
@@ -197,7 +197,8 @@ export class HttpClient {
|
|
|
197
197
|
},
|
|
198
198
|
context: {
|
|
199
199
|
library: '@datalyr/react-native',
|
|
200
|
-
version: '1.0.
|
|
200
|
+
version: '1.0.5',
|
|
201
|
+
source: 'mobile_app', // Explicitly set source for mobile
|
|
201
202
|
userProperties: payload.userProperties,
|
|
202
203
|
},
|
|
203
204
|
timestamp: payload.timestamp,
|
package/DEBUG_WHITE_SCREEN.md
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
# ๐ Debug White Screen Issue
|
|
2
|
-
|
|
3
|
-
## Step 1: Check SDK Version
|
|
4
|
-
|
|
5
|
-
First, verify you're using the latest version:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Check what version is installed
|
|
9
|
-
npm list @datalyr/react-native-sdk
|
|
10
|
-
|
|
11
|
-
# Update to latest version
|
|
12
|
-
npm install @datalyr/react-native-sdk@1.0.10
|
|
13
|
-
|
|
14
|
-
# Or with yarn
|
|
15
|
-
yarn add @datalyr/react-native-sdk@1.0.10
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Step 2: Check Import Pattern
|
|
19
|
-
|
|
20
|
-
Make sure you're using the correct import:
|
|
21
|
-
|
|
22
|
-
```typescript
|
|
23
|
-
// โ
CORRECT (v1.0.10+)
|
|
24
|
-
import { datalyr } from '@datalyr/react-native-sdk';
|
|
25
|
-
|
|
26
|
-
// โ WRONG (causes white screen)
|
|
27
|
-
import Datalyr from '@datalyr/react-native-sdk';
|
|
28
|
-
import DatalyrSDK from '@datalyr/react-native-sdk';
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Step 3: Enable Debug Logging
|
|
32
|
-
|
|
33
|
-
Add debug logging to see what's happening:
|
|
34
|
-
|
|
35
|
-
```typescript
|
|
36
|
-
import { datalyr } from '@datalyr/react-native-sdk';
|
|
37
|
-
|
|
38
|
-
const App = () => {
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
initializeSDK();
|
|
41
|
-
}, []);
|
|
42
|
-
|
|
43
|
-
const initializeSDK = async () => {
|
|
44
|
-
try {
|
|
45
|
-
console.log('๐ Starting SDK initialization...');
|
|
46
|
-
|
|
47
|
-
await datalyr.initialize({
|
|
48
|
-
workspaceId: 'your-workspace-id',
|
|
49
|
-
debug: true, // Enable debug logs
|
|
50
|
-
autoEvents: {
|
|
51
|
-
trackSessions: true,
|
|
52
|
-
trackScreenViews: true,
|
|
53
|
-
trackAppUpdates: true,
|
|
54
|
-
trackPerformance: true,
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
console.log('โ
SDK initialized successfully');
|
|
59
|
-
|
|
60
|
-
} catch (error) {
|
|
61
|
-
console.error('โ SDK initialization failed:', error);
|
|
62
|
-
// Don't let SDK errors crash the app
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
|
68
|
-
<Text>App is working!</Text>
|
|
69
|
-
</View>
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Step 4: Check Metro/React Native Logs
|
|
75
|
-
|
|
76
|
-
Run your app and check the logs:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
# For React Native CLI
|
|
80
|
-
npx react-native run-ios --verbose
|
|
81
|
-
# or
|
|
82
|
-
npx react-native run-android --verbose
|
|
83
|
-
|
|
84
|
-
# For Expo
|
|
85
|
-
expo start --clear
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Look for errors like:
|
|
89
|
-
- `TypeError: Cannot read property 'initialize' of undefined`
|
|
90
|
-
- `ReferenceError: datalyr is not defined`
|
|
91
|
-
- Any red error messages
|
|
92
|
-
|
|
93
|
-
## Step 5: Test with Minimal Setup
|
|
94
|
-
|
|
95
|
-
Create a minimal test component:
|
|
96
|
-
|
|
97
|
-
```typescript
|
|
98
|
-
// TestSDK.tsx
|
|
99
|
-
import React, { useEffect, useState } from 'react';
|
|
100
|
-
import { View, Text, Alert } from 'react-native';
|
|
101
|
-
|
|
102
|
-
// Test 1: Check if import works
|
|
103
|
-
try {
|
|
104
|
-
const { datalyr } = require('@datalyr/react-native-sdk');
|
|
105
|
-
console.log('โ
Import successful:', typeof datalyr);
|
|
106
|
-
} catch (error) {
|
|
107
|
-
console.error('โ Import failed:', error);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
const TestSDK = () => {
|
|
111
|
-
const [status, setStatus] = useState('Testing...');
|
|
112
|
-
|
|
113
|
-
useEffect(() => {
|
|
114
|
-
testSDK();
|
|
115
|
-
}, []);
|
|
116
|
-
|
|
117
|
-
const testSDK = async () => {
|
|
118
|
-
try {
|
|
119
|
-
// Test import
|
|
120
|
-
const { datalyr } = await import('@datalyr/react-native-sdk');
|
|
121
|
-
console.log('โ
Dynamic import successful');
|
|
122
|
-
setStatus('Import OK');
|
|
123
|
-
|
|
124
|
-
// Test initialization
|
|
125
|
-
await datalyr.initialize({
|
|
126
|
-
workspaceId: 'test-workspace',
|
|
127
|
-
debug: true,
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
console.log('โ
SDK initialized');
|
|
131
|
-
setStatus('SDK Initialized');
|
|
132
|
-
|
|
133
|
-
} catch (error) {
|
|
134
|
-
console.error('โ Test failed:', error);
|
|
135
|
-
setStatus(`Error: ${error.message}`);
|
|
136
|
-
Alert.alert('SDK Test Failed', error.message);
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
return (
|
|
141
|
-
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
|
142
|
-
<Text>SDK Test Status: {status}</Text>
|
|
143
|
-
</View>
|
|
144
|
-
);
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
export default TestSDK;
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## Step 6: Check Dependencies
|
|
151
|
-
|
|
152
|
-
Verify all dependencies are installed:
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
# Check if these are installed
|
|
156
|
-
npm list react-native-get-random-values
|
|
157
|
-
npm list @react-native-async-storage/async-storage
|
|
158
|
-
npm list uuid
|
|
159
|
-
|
|
160
|
-
# Install if missing
|
|
161
|
-
npm install react-native-get-random-values @react-native-async-storage/async-storage uuid
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## Step 7: Platform-Specific Checks
|
|
165
|
-
|
|
166
|
-
### iOS
|
|
167
|
-
```bash
|
|
168
|
-
cd ios && pod install && cd ..
|
|
169
|
-
npx react-native run-ios --verbose
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Android
|
|
173
|
-
```bash
|
|
174
|
-
npx react-native run-android --verbose
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
## Step 8: Metro Cache Clear
|
|
178
|
-
|
|
179
|
-
Clear Metro cache:
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
# React Native CLI
|
|
183
|
-
npx react-native start --reset-cache
|
|
184
|
-
|
|
185
|
-
# Expo
|
|
186
|
-
expo start --clear
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
## Step 9: Temporary Workaround
|
|
190
|
-
|
|
191
|
-
If still having issues, try this temporary workaround:
|
|
192
|
-
|
|
193
|
-
```typescript
|
|
194
|
-
import React, { useEffect } from 'react';
|
|
195
|
-
import { View, Text } from 'react-native';
|
|
196
|
-
|
|
197
|
-
const App = () => {
|
|
198
|
-
useEffect(() => {
|
|
199
|
-
// Delay SDK initialization to avoid blocking render
|
|
200
|
-
setTimeout(async () => {
|
|
201
|
-
try {
|
|
202
|
-
const { datalyr } = await import('@datalyr/react-native-sdk');
|
|
203
|
-
await datalyr.initialize({
|
|
204
|
-
workspaceId: 'your-workspace-id',
|
|
205
|
-
debug: true,
|
|
206
|
-
});
|
|
207
|
-
console.log('โ
SDK initialized with delay');
|
|
208
|
-
} catch (error) {
|
|
209
|
-
console.error('โ SDK error (non-blocking):', error);
|
|
210
|
-
}
|
|
211
|
-
}, 1000);
|
|
212
|
-
}, []);
|
|
213
|
-
|
|
214
|
-
return (
|
|
215
|
-
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
|
216
|
-
<Text>App is working!</Text>
|
|
217
|
-
</View>
|
|
218
|
-
);
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
export default App;
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
## Step 10: Check Package.json
|
|
225
|
-
|
|
226
|
-
Verify your package.json has the correct version:
|
|
227
|
-
|
|
228
|
-
```json
|
|
229
|
-
{
|
|
230
|
-
"dependencies": {
|
|
231
|
-
"@datalyr/react-native-sdk": "^1.0.10"
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
```
|
package/FRAMEWORK_COMPARISON.md
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
# ๐ฏ React Native CLI vs Expo - SDK Compatibility Guide
|
|
2
|
-
|
|
3
|
-
## ๐ Quick Decision Matrix
|
|
4
|
-
|
|
5
|
-
**Need maximum attribution accuracy?** โ **React Native CLI**
|
|
6
|
-
**Want easier development?** โ **Expo Managed Workflow**
|
|
7
|
-
**Want best of both worlds?** โ **Expo Bare Workflow**
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## ๐ Feature Comparison
|
|
12
|
-
|
|
13
|
-
| Feature | React Native CLI | Expo Managed | Expo Bare |
|
|
14
|
-
|---------|------------------|--------------|-----------|
|
|
15
|
-
| **Setup Complexity** | Medium | Easy | Medium |
|
|
16
|
-
| **Attribution Accuracy** | 100% | 90% | 100% |
|
|
17
|
-
| **IDFA/GAID Collection** | โ
Full | โ ๏ธ Limited | โ
Full |
|
|
18
|
-
| **Auto Events** | โ
Full | โ
Full | โ
Full |
|
|
19
|
-
| **Deep Link Attribution** | โ
Full | โ
Full | โ
Full |
|
|
20
|
-
| **Device Fingerprinting** | โ
Full | โ ๏ธ Limited | โ
Full |
|
|
21
|
-
| **Build/Deploy Ease** | Complex | Easy | Easy |
|
|
22
|
-
| **App Store Submission** | Manual | Automated | Automated |
|
|
23
|
-
| **OTA Updates** | Custom | โ
Built-in | โ
Built-in |
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## ๐ React Native CLI (Recommended for Attribution)
|
|
28
|
-
|
|
29
|
-
### โ
**Pros:**
|
|
30
|
-
- **Maximum attribution accuracy** (100%)
|
|
31
|
-
- Full IDFA/GAID support for iOS/Android
|
|
32
|
-
- Complete device fingerprinting
|
|
33
|
-
- Access to all native modules
|
|
34
|
-
- Best performance for tracking
|
|
35
|
-
|
|
36
|
-
### โ **Cons:**
|
|
37
|
-
- More complex setup and configuration
|
|
38
|
-
- Manual build and deployment process
|
|
39
|
-
- Requires native development knowledge
|
|
40
|
-
- No built-in OTA updates
|
|
41
|
-
|
|
42
|
-
### ๐ฏ **Best For:**
|
|
43
|
-
- Apps where attribution accuracy is critical
|
|
44
|
-
- Teams comfortable with native development
|
|
45
|
-
- Apps that need custom native functionality
|
|
46
|
-
- Maximum tracking capabilities
|
|
47
|
-
|
|
48
|
-
### ๐ **Installation:**
|
|
49
|
-
Follow the main [INSTALL.md](./INSTALL.md) guide.
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## ๐จ Expo Managed Workflow
|
|
54
|
-
|
|
55
|
-
### โ
**Pros:**
|
|
56
|
-
- **Super easy setup** and development
|
|
57
|
-
- Automatic build and deployment (EAS)
|
|
58
|
-
- Built-in OTA updates
|
|
59
|
-
- No native code complexity
|
|
60
|
-
- Great development experience
|
|
61
|
-
|
|
62
|
-
### โ **Cons:**
|
|
63
|
-
- **Limited IDFA/GAID collection** (needs extra setup)
|
|
64
|
-
- Some device info not available
|
|
65
|
-
- Can't use custom native modules
|
|
66
|
-
- Slightly less attribution accuracy (90%)
|
|
67
|
-
|
|
68
|
-
### ๐ฏ **Best For:**
|
|
69
|
-
- Teams prioritizing development speed
|
|
70
|
-
- Apps where core attribution is sufficient
|
|
71
|
-
- First-time React Native developers
|
|
72
|
-
- Rapid prototyping and MVP development
|
|
73
|
-
|
|
74
|
-
### ๐ **Installation:**
|
|
75
|
-
Follow the [EXPO_INSTALL.md](./EXPO_INSTALL.md) guide.
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## โก Expo Bare Workflow (Best of Both)
|
|
80
|
-
|
|
81
|
-
### โ
**Pros:**
|
|
82
|
-
- **Full React Native CLI features**
|
|
83
|
-
- Easy build/deployment with EAS
|
|
84
|
-
- Built-in OTA updates
|
|
85
|
-
- Maximum attribution accuracy (100%)
|
|
86
|
-
- Can eject to full native if needed
|
|
87
|
-
|
|
88
|
-
### โ **Cons:**
|
|
89
|
-
- Slightly more complex than managed workflow
|
|
90
|
-
- Need to manage native dependencies
|
|
91
|
-
- Larger app bundle size
|
|
92
|
-
|
|
93
|
-
### ๐ฏ **Best For:**
|
|
94
|
-
- Teams wanting maximum features + easy deployment
|
|
95
|
-
- Apps that might need native modules later
|
|
96
|
-
- Best compromise between power and simplicity
|
|
97
|
-
|
|
98
|
-
### ๐ **Installation:**
|
|
99
|
-
Follow the main [INSTALL.md](./INSTALL.md) guide (same as React Native CLI).
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## ๐ฑ Attribution Accuracy Breakdown
|
|
104
|
-
|
|
105
|
-
### **React Native CLI / Expo Bare: 100% Accuracy**
|
|
106
|
-
```typescript
|
|
107
|
-
โ
UTM parameters (utm_source, utm_medium, etc.)
|
|
108
|
-
โ
Click IDs (fbclid, ttclid, gclid)
|
|
109
|
-
โ
LYR tags (lyr, datalyr, dl_tag)
|
|
110
|
-
โ
IDFA collection (iOS with permission)
|
|
111
|
-
โ
GAID collection (Android)
|
|
112
|
-
โ
Full device fingerprinting
|
|
113
|
-
โ
Carrier information
|
|
114
|
-
โ
Precise device specifications
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### **Expo Managed: 90% Accuracy**
|
|
118
|
-
```typescript
|
|
119
|
-
โ
UTM parameters (utm_source, utm_medium, etc.)
|
|
120
|
-
โ
Click IDs (fbclid, ttclid, gclid)
|
|
121
|
-
โ
LYR tags (lyr, datalyr, dl_tag)
|
|
122
|
-
โ ๏ธ IDFA collection (requires expo-ads-admob setup)
|
|
123
|
-
โ ๏ธ GAID collection (requires expo-ads-admob setup)
|
|
124
|
-
โ ๏ธ Limited device fingerprinting
|
|
125
|
-
โ Carrier information not available
|
|
126
|
-
โ ๏ธ Basic device specifications
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## ๐ฏ **Recommendation by Use Case**
|
|
130
|
-
|
|
131
|
-
### **๐ฅ High-Value Apps (E-commerce, Finance, Gaming)**
|
|
132
|
-
**โ React Native CLI** or **Expo Bare**
|
|
133
|
-
- Need maximum attribution accuracy
|
|
134
|
-
- IDFA/GAID collection critical for ROAS optimization
|
|
135
|
-
- Can justify development complexity
|
|
136
|
-
|
|
137
|
-
### **๐ฑ Content Apps (News, Social, Productivity)**
|
|
138
|
-
**โ Expo Managed Workflow**
|
|
139
|
-
- Core attribution (UTM, click IDs) is sufficient
|
|
140
|
-
- Development speed more important
|
|
141
|
-
- Easy deployment and updates preferred
|
|
142
|
-
|
|
143
|
-
### **๐ Startups/MVPs**
|
|
144
|
-
**โ Expo Managed Workflow**
|
|
145
|
-
- Ship fast and iterate
|
|
146
|
-
- Core attribution covers most needs
|
|
147
|
-
- Can migrate to bare/CLI later if needed
|
|
148
|
-
|
|
149
|
-
### **๐ข Enterprise Apps**
|
|
150
|
-
**โ React Native CLI** or **Expo Bare**
|
|
151
|
-
- Need full control and customization
|
|
152
|
-
- Security and compliance requirements
|
|
153
|
-
- Custom native integrations likely
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
## ๐ก **Migration Path**
|
|
158
|
-
|
|
159
|
-
**You can always upgrade!**
|
|
160
|
-
|
|
161
|
-
```
|
|
162
|
-
Expo Managed โ Expo Bare โ React Native CLI
|
|
163
|
-
โ โ โ
|
|
164
|
-
Easy Medium Complex
|
|
165
|
-
90% 100% 100%
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
**Start with Expo Managed if unsure** - you can eject to bare workflow or migrate to React Native CLI when you need more features.
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
## ๐ **Bottom Line**
|
|
173
|
-
|
|
174
|
-
- **Most apps:** Start with **Expo Managed** (90% attribution accuracy is excellent)
|
|
175
|
-
- **Attribution-critical apps:** Use **React Native CLI** or **Expo Bare**
|
|
176
|
-
- **Want easy deployment:** Use **Expo Bare** (best compromise)
|
|
177
|
-
|
|
178
|
-
**All workflows support the automatic events system and core attribution tracking!** ๐
|
package/SDK_COMPLETION_STATUS.md
DELETED
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
# ๐ Datalyr Mobile SDK - Completion Status
|
|
2
|
-
|
|
3
|
-
## ๐ฏ **Is the SDK "Finished"?**
|
|
4
|
-
|
|
5
|
-
**Short Answer:** The SDK is **functionally complete** for core attribution tracking but needs **automatic events** to be competitive with Mixpanel.
|
|
6
|
-
|
|
7
|
-
**With Auto-Events Added:** The SDK is now **95% complete** and production-ready! ๐
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## โ
**What We Have (Core Attribution SDK)**
|
|
12
|
-
|
|
13
|
-
### **๐ฅ Core Features**
|
|
14
|
-
- โ
**Event Tracking** (`track()`, `screen()`, `identify()`, `alias()`)
|
|
15
|
-
- โ
**Attribution System** (LYR tags, UTM params, fbclid, ttclid, gclid)
|
|
16
|
-
- โ
**Device Fingerprinting** (IDFA/GAID, device info, network detection)
|
|
17
|
-
- โ
**Offline Support** (Queue with retry logic, exponential backoff)
|
|
18
|
-
- โ
**Session Management** (30-min timeout, visitor/session IDs)
|
|
19
|
-
- โ
**Database Integration** (Works with existing Supabase schema)
|
|
20
|
-
- โ
**Deep Link Attribution** (Install tracking, first-launch detection)
|
|
21
|
-
|
|
22
|
-
### **๐ฏ Attribution Features**
|
|
23
|
-
- โ
**Facebook:** fbclid parameter capture
|
|
24
|
-
- โ
**TikTok:** ttclid parameter capture
|
|
25
|
-
- โ
**Google:** gclid parameter capture
|
|
26
|
-
- โ
**UTM Parameters:** Full support (source, medium, campaign, etc.)
|
|
27
|
-
- โ
**LYR Tags:** Custom attribution system (lyr, datalyr, dl_tag)
|
|
28
|
-
- โ
**Install Detection:** First launch attribution
|
|
29
|
-
- โ
**Deep Links:** URL parameter extraction
|
|
30
|
-
|
|
31
|
-
### **๐ฑ Technical Architecture**
|
|
32
|
-
- โ
**TypeScript:** Full type safety
|
|
33
|
-
- โ
**React Native:** Cross-platform (iOS/Android)
|
|
34
|
-
- โ
**Modular Design:** Pluggable components
|
|
35
|
-
- โ
**Error Handling:** Comprehensive try/catch with logging
|
|
36
|
-
- โ
**Performance:** Lightweight, non-blocking
|
|
37
|
-
- โ
**Privacy:** GDPR/CCPA compliant (respectDoNotTrack)
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## ๐ **What We Added (Auto-Events System)**
|
|
42
|
-
|
|
43
|
-
### **๐ Automatic Events (Like Mixpanel)**
|
|
44
|
-
- โ
**Session Tracking** (`session_start`, `session_end`)
|
|
45
|
-
- โ
**App Lifecycle** (`app_foreground`, `app_background`)
|
|
46
|
-
- โ
**Screen Views** (Automatic `pageviews` events)
|
|
47
|
-
- โ
**App Install** (First launch detection)
|
|
48
|
-
- โ
**App Updates** (Version change detection)
|
|
49
|
-
- โ
**Performance** (`app_launch_performance`)
|
|
50
|
-
- โ
**Revenue Events** (Automatic purchase tracking)
|
|
51
|
-
- โ
**SDK Events** (`sdk_initialized`)
|
|
52
|
-
|
|
53
|
-
### **๐๏ธ Auto-Events Configuration**
|
|
54
|
-
```typescript
|
|
55
|
-
autoEvents: {
|
|
56
|
-
trackSessions: true, // Session start/end
|
|
57
|
-
trackScreenViews: true, // Automatic screen tracking
|
|
58
|
-
trackAppUpdates: true, // App version changes
|
|
59
|
-
trackPerformance: true, // Launch time tracking
|
|
60
|
-
sessionTimeoutMs: 30 * 60 * 1000, // 30 minutes
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### **๐ Mixpanel Parity**
|
|
65
|
-
| Feature | Mixpanel | Datalyr SDK | Status |
|
|
66
|
-
|---------|----------|-------------|---------|
|
|
67
|
-
| Session Tracking | โ
| โ
| **Complete** |
|
|
68
|
-
| Screen Views | โ
| โ
| **Complete** |
|
|
69
|
-
| App Install | โ
| โ
| **Complete** |
|
|
70
|
-
| App Updates | โ
| โ
| **Complete** |
|
|
71
|
-
| App Lifecycle | โ
| โ
| **Complete** |
|
|
72
|
-
| Performance | โ
| โ
| **Complete** |
|
|
73
|
-
| Revenue Tracking | โ
| โ
| **Complete** |
|
|
74
|
-
| Push Notifications | โ
| โ | *Optional* |
|
|
75
|
-
| Crash Tracking | โ
| โ | *Optional* |
|
|
76
|
-
| A/B Testing | โ
| โ | *Not needed* |
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## ๐ **SDK Usage Example**
|
|
81
|
-
|
|
82
|
-
```typescript
|
|
83
|
-
import { datalyr } from '@datalyr/react-native-sdk';
|
|
84
|
-
|
|
85
|
-
// Initialize with auto-events
|
|
86
|
-
await datalyr.initialize({
|
|
87
|
-
workspaceId: 'your-workspace-id',
|
|
88
|
-
autoEvents: {
|
|
89
|
-
trackSessions: true,
|
|
90
|
-
trackScreenViews: true,
|
|
91
|
-
trackAppUpdates: true,
|
|
92
|
-
trackPerformance: true,
|
|
93
|
-
},
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
// Manual events still work
|
|
97
|
-
await datalyr.track('purchase', {
|
|
98
|
-
value: 29.99,
|
|
99
|
-
currency: 'USD'
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
// Automatic events happen behind the scenes:
|
|
103
|
-
// โ
session_start (automatic)
|
|
104
|
-
// โ
app_install (automatic)
|
|
105
|
-
// โ
pageviews (automatic)
|
|
106
|
-
// โ
app_foreground (automatic)
|
|
107
|
-
// โ
session_end (automatic)
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## ๐ **Comparison: Manual vs. Automatic Events**
|
|
113
|
-
|
|
114
|
-
### **Before Auto-Events (Manual Only)**
|
|
115
|
-
```typescript
|
|
116
|
-
// Developer had to track everything manually
|
|
117
|
-
await datalyr.track('session_start', { timestamp: Date.now() });
|
|
118
|
-
await datalyr.screen('Home');
|
|
119
|
-
await datalyr.track('app_foreground', { /* manual data */ });
|
|
120
|
-
// ๐ฐ Easy to forget, inconsistent data
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### **After Auto-Events (Like Mixpanel)**
|
|
124
|
-
```typescript
|
|
125
|
-
// SDK tracks automatically
|
|
126
|
-
// โ
session_start (automatic)
|
|
127
|
-
// โ
pageviews: Home (automatic)
|
|
128
|
-
// โ
app_foreground (automatic)
|
|
129
|
-
// ๐ Consistent, complete data out-of-the-box
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## ๐ฏ **Is It Production Ready?**
|
|
135
|
-
|
|
136
|
-
### **โ
YES for Attribution**
|
|
137
|
-
- Complete attribution tracking
|
|
138
|
-
- All major ad platforms supported
|
|
139
|
-
- Deep link and install attribution
|
|
140
|
-
- Works with existing backend
|
|
141
|
-
|
|
142
|
-
### **โ
YES for Analytics (Now)**
|
|
143
|
-
- Automatic events like Mixpanel
|
|
144
|
-
- Session and user journey tracking
|
|
145
|
-
- Revenue and conversion tracking
|
|
146
|
-
- Performance monitoring
|
|
147
|
-
|
|
148
|
-
### **๐ฅ Competitive Analysis**
|
|
149
|
-
|
|
150
|
-
| SDK Feature | Mixpanel | Amplitude | Firebase | **Datalyr** |
|
|
151
|
-
|-------------|----------|-----------|----------|-------------|
|
|
152
|
-
| Attribution | โ | โ | โ | **โ
** |
|
|
153
|
-
| Auto Events | โ
| โ
| โ
| **โ
** |
|
|
154
|
-
| Session Tracking | โ
| โ
| โ
| **โ
** |
|
|
155
|
-
| Offline Support | โ
| โ
| โ
| **โ
** |
|
|
156
|
-
| Ad Platform Integration | โ | โ | โ | **โ
** |
|
|
157
|
-
| Revenue Tracking | โ
| โ
| โ
| **โ
** |
|
|
158
|
-
|
|
159
|
-
**๐ Datalyr Advantage:** Only SDK that combines attribution + automatic events!
|
|
160
|
-
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
## ๐ง **What's Still Missing (Optional)**
|
|
164
|
-
|
|
165
|
-
### **๐ฑ Advanced Features (10% of value)**
|
|
166
|
-
- โ **Push Notification Attribution** (clicks, opens)
|
|
167
|
-
- โ **Crash Reporting** (app crashes, errors)
|
|
168
|
-
- โ **Network State Monitoring** (online/offline events)
|
|
169
|
-
- โ **Advanced Fingerprinting** (canvas, audio fingerprinting)
|
|
170
|
-
- โ **A/B Testing** (not needed for attribution)
|
|
171
|
-
|
|
172
|
-
### **๐ง Development Improvements**
|
|
173
|
-
- โ **Native iOS SDK** (Swift implementation)
|
|
174
|
-
- โ **Native Android SDK** (Kotlin implementation)
|
|
175
|
-
- โ **React Native Navigation** (Auto screen tracking)
|
|
176
|
-
- โ **Expo Plugin** (Easy configuration)
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## ๐ **Final Verdict**
|
|
181
|
-
|
|
182
|
-
### **SDK Completion: 95% โ
**
|
|
183
|
-
|
|
184
|
-
**Core Attribution:** 100% Complete โ
|
|
185
|
-
**Automatic Events:** 100% Complete โ
|
|
186
|
-
**Advanced Features:** 60% Complete (optional)
|
|
187
|
-
|
|
188
|
-
**Latest Version:** v1.0.10 - Production Ready ๐
|
|
189
|
-
|
|
190
|
-
### **Ready for Production?**
|
|
191
|
-
|
|
192
|
-
**๐ฅ ABSOLUTELY YES!**
|
|
193
|
-
|
|
194
|
-
The SDK now provides:
|
|
195
|
-
1. **Complete attribution tracking** (better than any competitor)
|
|
196
|
-
2. **Automatic events** (like Mixpanel/Amplitude)
|
|
197
|
-
3. **Production-grade reliability** (offline support, error handling)
|
|
198
|
-
4. **Easy integration** (works with existing backend)
|
|
199
|
-
|
|
200
|
-
### **Next Steps**
|
|
201
|
-
1. โ
**Test in your mobile app**
|
|
202
|
-
2. โ
**Verify attribution flow**
|
|
203
|
-
3. โ
**Monitor automatic events**
|
|
204
|
-
4. ๐ **Launch to production**
|
|
205
|
-
|
|
206
|
-
The mobile SDK is now **feature-complete** and ready for real-world usage! ๐
|