Use Cases
Cross-Platform Apps Track iOS and Android users with a single SDK. See which ads drive installs and conversions on both platforms. E-commerce Apps Monitor purchases, cart additions, and product views with revenue attribution back to ad campaigns. SaaS Mobile Apps Track feature usage, user engagement, and subscription conversions with cross-device attribution. Expo Apps Full support for Expo managed and bare workflows with minimal setup.Before You Start
- You have a DATALYR account
- You’ve created a workspace
- You have a React Native or Expo project
- React Native 0.60+
- iOS 13.0+ and Android 5.0+ (API 21+)
Step 1: Get Your API Key
- Log in to your DATALYR dashboard
- Go to Settings → API Keys
- Create a new API key or copy an existing one
- Your API key will start with
dk_
Step 2: Install the SDK
iOS Setup (React Native CLI)
Expo Users
No additional configuration needed. The package works with both managed and bare workflows.Step 3: Initialize the SDK
Add initialization to your app entry point:App.tsx or App.js
Step 4: Track Your First Event
Test that tracking works:Step 5: Verify Tracking
- Run your app on a simulator/emulator or device
- Go to your DATALYR dashboard
- Click Events in the sidebar
- You should see events within 10 seconds
What Gets Tracked Automatically
WhenenableAutoEvents is enabled (default: true):
app_install- First app openapp_open- App launchesapp_background- App enters backgroundapp_foreground- App returns to foregroundapp_update- App version changessession_start- New session beginssession_end- Session expires
Track Custom Events
Track any custom event with optional properties:Track Purchases
Track purchase events with revenue:Track Subscriptions
Track subscription events for in-app subscriptions:Identify Users
Identify users after signup or login for cross-device attribution:Track Screen Views
Track screen views with React Navigation:SKAdNetwork Support (iOS 14+)
Enable SKAdNetwork conversion value tracking:SKAdNetwork Templates
Choose a template based on your business model:- ecommerce: Purchase events, revenue ranges
- gaming: Level completion, in-app purchases, retention
- subscription: Trial starts, conversions, renewals
Identity Resolution
The SDK includes persistent anonymous IDs for complete user journey tracking:Attribution Tracking
The SDK automatically tracks:- Deep links and Universal Links
- UTM parameters
- Platform click IDs (fbclid, gclid, ttclid)
- Install referrer
- Campaign data
Session Management
Sessions are automatically tracked with a 30-minute timeout:Deep Link Handling
Track deep link opens with React Navigation:Offline Support
Events are automatically queued when offline and sent when connection is restored:Debug Mode
Enable debug logging during development:- Event tracking logs
- Network requests
- Queue operations
- Attribution updates
- Error messages
TypeScript Support
Full TypeScript support with type definitions:Expo Configuration
Works with Expo managed and bare workflows with no additional configuration:Configuration Options
Troubleshooting
Events not appearing?- Check your API key is correct (starts with
dk_) - Enable debug mode to see logs
- Verify network connectivity
- Check
getStatus()for queue information - Call
flush()to force send events
- Ensure API key starts with
dk_ - Get your API key from: https://app.datalyr.com/settings/api-keys
- Verify key is active
@types/react-native installed.
Next Steps
Verify Tracking
Confirm events are coming through
Track Custom Events
Learn the full event tracking API
Connect Integrations
Link Meta, Google, TikTok Ads
View Dashboard
See your tracking data