Skip to main content
This guide explains how to add referral tracking capabilities to your existing attribution links without creating new ones. In this guide, we’ll use Branch.io as an example. The implementation is similar if you use other attribution libraries like AppsFlyer, Singular or Adjust.
Mobile attribution builds on top of web attribution since users typically click referral links on web before downloading your app. The web setup captures the initial referral code that will later be attributed to the mobile app installation and signup.

Overview

The referral flow works as follows:
  • Existing user shares their unique referral link
  • New user clicks the link and is directed to your landing page
  • User then clicks on AppStore or Google Play app download
  • New user installs and opens the app
  • App receives referral data and attributes the installation
  • Backend records the referral during signup

Basic Concept

Instead of creating new links for each referrer, you’ll append referral data to your existing Branch.io (or other attribution library) app install link:

Data Persists Through Installation

When a user clicks the referral link, Branch.io stores the referral data (including the referral_ucc) in their servers and associates it with the user’s device fingerprint. This allows the data to persist through:
  • App Store redirect
  • App download
  • First app launch

Data Flow Sequence

App Installation

Accessing Referral Data in Your App

iOS Implementation

Android Implementation

React Native Implementation

Using the Referral Data During Signup

When the user completes signup, retrieve the stored referral code and include it in your signup API call:

iOS Implementation

Android Implementation

React Native Implementation