App Stores Implementation Guide


This guide will walk you through how to attribute pre-installed users using the Branch SDK.

Learn more about Pre-Install Attribution.


Android Only

The following functionality is applicable to Android apps only.


Pre-Install Overrides Attribution

If you include pre-install data via the SDK, it will always override any attribution info Branch receives from the Branch link itself.

1. Find your App Store Partner Key

In order to attribute your users from your App Store partner, we need to find your App Store Partner Key. This is used in Step 2 and Step 3.

App Store Preinstall Partner Key
  • a_9apps_alibaba
  • a_oppo
  • a_xiaomi

2. Set Data in the Pre-Loaded APK


Pre-loaded Data in the APK

If you set the preloaded data in the APK, it will override the system props data.

After initialization, call these setters to set the data in the APK:

Branch.setPreinstallCampaign(“My Campaign Name”)

3. Read Pre-loaded Data from the Android system properties

  1. Create a json file pre_install_apps.branch as follows:
            "apps": {
                    "": {
                            "preinstall_partner": "APPSTORE_PARTNER_KEY",
                            "preinstall_campaign": "campaign_to_attribute"
  2. Ask the device manufacturer to add the file in the OS level file system.
  3. Set the file path in the build.props as below:
  4. 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?