Mobile attribution

This guide walks through how to set up mobile app referral attribution.

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.

Overview

The referral flow works as follows:

  • Existing user shares their unique referral link
  • New user clicks the link and is directed to app store
  • 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 app install link:

Unset
Copy

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

Unset
Copy

App Installation

Unset
Copy

Accessing Referral Data in Your App

iOS Implementation

Swift
Copy

Android Implementation

Kotlin
Copy

React Native Implementation

Javascript
Copy

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

Swift
Copy

Android Implementation

Kotlin
Copy

React Native Implementation

Javascript
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard