Learn how to set up integration with Branch

To integrate Branch go to Integrations > Branch and set credentials.

Open your Branch Account Settings and find the Branch Key field. Use it for Key test or Key live in Adapty Dashboard. In Branch, switch between Live and Tests environments for the appropriate key.

You can send an event with Proceeds (after Apple/Google cut) or just revenue. Also, you can check a box for reporting in the user's currency.

Branch Account Settings

SDK configuration

It's very important to send Branch attribution data from the device to Adapty using Adapty.updateAttribution() SDK method. The example below shows how to do that.

To connect Branch user and Adapty user, make sure you provide your customerUserId as Branch Identity id. If you prefer not to use customerUserId in Branch, use networkUserId param in attribution method to specify the Branch user ID to attach to.

// login
// login and update attribution
    .setIdentity("YOUR_USER_ID") { referringParams, error ->
        referringParams?.let { params ->
            Adapty.updateAttribution(data, AdaptyAttributionSource.BRANCH) { error ->
                            if (error != null) {
                                //handle error

// logout
import 'package:flutter_branch_sdk/flutter_branch_sdk.dart';

import branch from 'react-native-branch';

Branch.setIdentity("your user id");

Next, pass the attribution you receive from the initializing method of Branch iOS SDK to Adapty.

// Pass the attribution you receive from the initializing method of Branch iOS SDK to Adapty.
Branch.getInstance().initSession(launchOptions: launchOptions) { (data, error) in
    if let data = data {
        Adapty.updateAttribution(data, source: .branch)
//everything is in the above snippet for Android
import 'package:flutter_branch_sdk/flutter_branch_sdk.dart';

FlutterBranchSdk.initSession().listen((data) async {
    try {
        await Adapty().updateAttribution(data, source: AdaptyAttributionSource.branch);
    } on AdaptyError catch (adaptyError) {
        // handle error
    } catch (e) {}
import { adapty, AttributionSource } from 'react-native-adapty';
import branch from 'react-native-branch';

  enComplete: ({
  }) => {
    adapty.updateAttribution(params, AttributionSource.Branch);
Branch.initSession(delegate(Dictionary<string, object> parameters, string error) {
    string attributionString = JsonUtility.ToJson(parameters);
    Adapty.UpdateAttribution(attributionString, AttributionSource.Branch, (error) => {
        // handle the error