Pre-Install Analytics

Attribute your app's install when it's already installed on the device through a wireless carrier.


Many mobile devices come pre-installed with apps already installed, which is great for the user experience because users do not need to launch an app store to download and install these pre-loaded apps. But how do you attribute the pre-loaded app install when there is no ad click to use for attributing the install (to the appropriate advertising partner)?

Branch solves this problem by allowing you to set all of the relevant partner/publisher information in the app itself, which we then collect during the install request on Android only.


OEM / App Store Specifics

If your app is pre-installed by the OEM and/or Third Party App Store (ex. Oppo or Xiaomi), please see our App Store specific guides. Follow this Pre-Install Analytics guide for attributing pre-installs through specific carriers.

How does it work?

  1. You have agreed with a wireless carrier/OEM (ex. AT&T) to pre-install your mobile app on their devices. In this case, the wireless carrier/OEM is the advertising partner.
  2. The ad partner's information is supplied to the app via the Branch SDK.
  3. On the app's first open, the Branch SDK collects the advertiser's information and uses it to attribute the app install and downstream app events (ex. COMPLETE_REGISTRATION) to the partner.
    • Events occurring in the first launch of the app will be attributed back to the partner (even if a Branch Link was clicked before the app was first opened). If there is then a later click, that will become the new most recent last touch, and future events will be attributed to that link click.


In order to attribute pre-installs, you need to have completed the following:

  • Implement the Branch Android SDK v4.0.0+

Enable Pre-Install Analytics

1. Set Data in the Pre-Loaded APK


Only for the First App Open

Including pre-install data via the Branch SDK will always override any attribution information Branch receives from the Branch Link itself, so make sure you use the setter ONLY for the first app open event, and not subsequent events/requests.

If you include the hard-coded attribution parameters for all measure sessions or other requests, then all requests are attributed accordingly (to the same hard-coded ad partner).

After loading the Branch SDK in the Application class as per the docs here, call the setters to set the data in the APK:

// Branch object initialization
Branch.getInstance().setPreinstallCampaign("My Campaign Name");
Branch.getInstance().setPreinstallPartner("Branch $3p Parameter Value");

When setting pre-loaded data via the setPreinstallPartner(...) method, you must use Branch's $3p value for the partner's name and it will override the system props data. Follow our guide on how to find a partner's $3p value.

Measuring the logs, the request should look like this:

  preinstall_campaign: “My Campaign Name”
  preinstall_partner: “Branch $3p Parameter Value”


Multiple Partners Pre-Installing Your App

If multiple partners are pre-installing your mobile app, then you can create a partner-specific build of your app for distribution to each publishing partner (where each build includes different partner settings, respective to the particular partner). The partner-specific build is what the partner pre-installs onto the desired devices.

2. Read the Pre-Loaded Data

Once the data is set, you need to read the pre-loaded data from the Android System Properties.

  1. Create a JSON file pre_install_apps.branch as follows:
    "apps": {
        "": {
            "preinstall_partner": "Branch $3p Parameter Value",
            "preinstall_campaign": "campaign_to_attribute"
  1. Ask the device manufacturer to add the file in the OS level file system.
  2. Set the file path in the build.props as below:
  3. The SDK checks if the APK has the pre-install data; if it's included, Branch uses the pre-install to override the link click data for attribution.

Did this page help you?