Meta Integration
The AppTrove React Native SDK provides seamless integration with Meta Install Referrer, enabling enhanced attribution data collection from Facebook, Instagram, and Facebook Lite ad campaigns.
Overview
Meta Install Referrer integration provides:
- Attribution data from Facebook, Instagram, and Facebook Lite campaigns
- View-through install data (not available in GPIR)
- Multiple session click-through installs
- Enhanced campaign performance measurement
Prerequisites
- Facebook App ID from Meta for Developers
How to Get Facebook App ID
Follow these steps to obtain your Facebook App ID:
Step 1: Access Meta for Developers
- Go to Meta for Developers
- Click Log In and sign in with your Facebook account
Step 2: Create or Select Your App
- Click My Apps in the top right corner
- If you have an existing app, select it from the list
- If you don't have an app, click Create App and follow the setup process
Step 3: Get Your App ID
- In your app dashboard, look for App ID in the top left corner
- The App ID is a long number (e.g.,
123456789012345
) - Copy this number - you'll need it for the SDK configuration
Step 4: Verify App Settings
- Go to App Settings → Basic
- Ensure your app is properly configured for Android
- Verify the Package Name matches your Android app's package name
Implementation
Add Facebook App ID to SDK Initialization
When initializing the SDK, add the Facebook App ID for Meta Install Referrer support:
import { TrackierConfig, TrackierSDK } from 'react-native-trackier';
// Initialize the SDK with Meta integration
const trackierConfig = new TrackierConfig("xxxx-xx-4505-bc8b-xx", TrackierConfig.EnvironmentProduction);
// Set Facebook App ID for Meta Install Referrer (Android Only)
trackierConfig.setFacebookAppId("FbTest123"); // For Android Only
TrackierSDK.initialize(trackierConfig);
Android Manifest Configuration
Since React Native apps run on Android, you also need to add the following queries to your android/app/src/main/AndroidManifest.xml
file to allow your app to get referral attribution data from Meta apps:
<queries>
<package android:name="com.facebook.katana" />
<package android:name="com.facebook.lite" />
<package android:name="com.instagram.android" />
</queries>
How It Works
The AppTrove React Native SDK automatically:
- Queries Meta apps (Facebook, Instagram, Facebook Lite)
- Collects encrypted attribution information
- Decrypts data using your GPIR decryption key
- Integrates Meta data with existing attribution flow
- Handles data deduplication
Troubleshooting
Common Issues
-
No Meta Data Received
- Verify Facebook App ID is correctly set
- Ensure Meta apps are installed
- Check SDK initialization order
-
Decryption Errors
- Verify GPIR decryption key is correct
- Ensure decryption key is shared with AppTrove
-
Missing Attribution Data
- Confirm campaign is configured for Meta Install Referrer
- Verify ad campaign objectives include app installs
Verification
To verify your setup:
- Use Facebook Ads Manager Preview feature
- Click test ad on Facebook/Instagram
- Monitor SDK logs for Meta data collection
- Confirm attribution data appears in dashboard
For more detailed information about Meta Install Referrer integration, visit the Meta Install Referrer documentation.