Skip to main content

Meta Integration

The AppTrove Flutter 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

  1. Go to Meta for Developers
  2. Click Log In and sign in with your Facebook account

Step 2: Create or Select Your App

  1. Click My Apps in the top right corner
  2. If you have an existing app, select it from the list
  3. If you don't have an app, click Create App and follow the setup process

Step 3: Get Your App ID

  1. In your app dashboard, look for App ID in the top left corner
  2. The App ID is a long number (e.g., 123456789012345)
  3. Copy this number - you'll need it for the SDK configuration

Step 4: Verify App Settings

  1. Go to App SettingsBasic
  2. Ensure your app is properly configured for Android
  3. 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:

class _MyHomePageState extends State<MyHomePage> {

void initState() {
super.initState();
initializeSdk();
}

Future<void> initializeSdk() async {
String key = "xxxx-xx-4505-bc8b-xx"; // Your SDK key from Trackier Panel

// Create SDK configuration
TrackerSDKConfig trackerSDKConfig = TrackerSDKConfig(key, "production");

// Set Facebook App ID for Meta Install Referrer
trackerSDKConfig.setFacebookAppId("YOUR_FACEBOOK_APP_ID");

// Initialize the SDK
Trackierfluttersdk.initializeSDK(trackerSDKConfig);
}
}

Android Manifest Configuration

Since Flutter 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 Flutter SDK automatically:

  1. Queries Meta apps (Facebook, Instagram, Facebook Lite)
  2. Collects encrypted attribution information
  3. Decrypts data using your GPIR decryption key
  4. Integrates Meta data with existing attribution flow
  5. Handles data deduplication

Troubleshooting

Common Issues

  1. No Meta Data Received

    • Verify Facebook App ID is correctly set
    • Ensure Meta apps are installed
    • Check SDK initialization order
  2. Decryption Errors

    • Verify GPIR decryption key is correct
    • Ensure decryption key is shared with AppTrove
  3. Missing Attribution Data

    • Confirm campaign is configured for Meta Install Referrer
    • Verify ad campaign objectives include app installs

Verification

To verify your setup:

  1. Use Facebook Ads Manager Preview feature
  2. Click test ad on Facebook/Instagram
  3. Monitor SDK logs for Meta data collection
  4. Confirm attribution data appears in dashboard

For more detailed information about Meta Install Referrer integration, visit the Meta Install Referrer documentation.