Tracking installations from Facebook

Attention. AppMetrica doesn't support Instagram, Audience Network, and Messenger advertising campaigns tracking.

You can use AppMetrica to track installations from Facebook ad campaigns. To do this, you need to use tracking links with deeplink.

However, AppMetrica reports show only the number of installations. The number of clicks and conversion to installations are not displayed, because when you click on an ad in Facebook, the user is sent directly to the app store, bypassing the redirect service.

To track installations from Facebook ad campaigns, follow these steps:

  1. Step 1. Prepare your app
  2. Step 2. Create a tracker
  3. Step 3. Create a Facebook advertising campaign

Step 1. Prepare your app

  1. Integrate the AppMetrica SDK. For more information, see Installation and initialization.
  2. Add deeplink support to your application. For more information, see Android documentation.
  3. Integrate the latest version of the Facebook SDK. For more information, see Facebook documentation.
  4. Test the Deferred Deep Link using App Ads Helper in Facebook.
  5. To get deeplink when installing the app, use the AppLinkData.fetchDeferredAppLinkData(Context, CompletionHandler) method:
    AppLinkData.fetchDeferredAppLinkData(this, new AppLinkData.CompletionHandler() {
        public void onDeferredAppLinkDataFetched(AppLinkData appLinkData) { 
            // Sending information about the deeplink to AppMetrica.
            // Redirecting via deeplink.
    Copied to clipboard
    For already installed application start, use the AppLinkData.createFromActivity(Activity) method. Add the following code to the onCreate method of the Activity that you are redirect to from Facebook.
    AppLinkData applinkData = AppLinkData.createFromActivity(this);
    if (applinkData != null) {
    Copied to clipboard

Step 2. Create a tracker

  1. In the AppMetrica interface, go to Trackers.

  2. In the top-left corner, click Create a tracker.
  3. In the Campaign details block fill in all fields:
    • This is remarketing campaign — Flag indicating that the tracker is being created for a remarketing campaign.

      For more information, see Creating a remarketing tracker.

    • Title — Enter the name of the tracker. After being created, the tracker is available in the list with the specified name.
    • Application — Select the application the tracker is being created for.
    • Partner — Select Facebook.
  4. In the Destination link settings block, select the platform and specify the created URL scheme for deeplink.
  5. Save the created tracker.
  6. Copy the link from the Tracking Deeplink field.

Step 3. Create a Facebook advertising campaign

When creating an ad campaign, use the tracking deeplink that was created in the previous step.

For more information, see Adding Deeplink to Ads Facebook documentation.