Branch

Send your event data from RudderStack to Branch.

Branch.io is an industry leader in cross-platform attribution, mobile app measurement, and deep linking. Many top-ranking apps use Branch to increase their performance and revenue through better performance and engagement.

Find the open source transformer code for this destination in the GitHub repository.

Getting started

RudderStack supports sending events to Branch via the following connection modes:

Connection ModeWebMobileServer
Device mode-Supported-
Cloud modeSupportedSupported-

Once you have confirmed that the source platform supports sending events to Branch, follow these steps:

  1. From your RudderStack dashboard, add a source. Then, from the list of destinations, select Branch Metrics.
  2. Assign a name to the destination and click Continue.

Connection settings

To successfully set up Branch as a destination, you will need to configure the following settings:

  • Branch key: Enter your Branch key from the Settings section in the Branch dashboard. For more information on obtaining this key, see FAQ.
  • Map Your Events To Branch Events: Use this setting to map your RudderStack events to specific Branch events from the dropdown.
info

Note that:

  • This setting is currently available in cloud mode only.
  • The mappings specified using this setting override the default event mappings configured by RudderStack internally.
Branch event mapping setting
  • Client-side Events Filtering: This setting lets you specify which events should be blocked or allowed to flow through to Branch. For more information on this setting, see the Client-side Events Filtering guide.
  • OneTrust cookie consent settings: This setting lets you associate OneTrust cookie consent groups to Branch.

Adding device mode integration

Depending on your platform of integration, follow the below steps below to integrate Branch with your app.

Identify

The identify call associates a user to their actions and also captures the traits associated with that user.

A sample identify call captured from the RudderStack iOS SDK is as shown:

[[RudderClient sharedInstance] identify:@"developer_user_id"];
info
You can call identify when the user registers to the app for the first time, logs into the app, or updates their information.

Track

The track call lets you record the customer events along with any properties associated with them.

A sample track call is shown below:

[[RudderClient sharedInstance] track:@"test_event"
                          properties:@{@"key":@"value", @"foo": @"bar"}]

All the events tracked by RudderStack are divided into three major Branch event categories:

Ecommerce event mapping

The following table lists the mapping between the RudderStack ecommerce events and the Branch commerce events:

RudderStack eventBranch event
Product AddedADD_TO_CART
Product Added to WishlistADD_TO_WISHLIST
Cart ViewedVIEW_CART
Checkout StartedINITIATE_PURCHASE
Payment Info EnteredADD_PAYMENT_INFO
Order CompletedADD_PAYMENT_INFO
Spend CreditsSPEND_CREDITS
Promotion ViewedVIEW_AD
Promotion ClickedCLICK_AD
Checkout StartedPURCHASE
Order CompletedPURCHASE
ReserveRESERVE
info

RudderStack also maps the Spend Credits event to Branch’s SPEND_CREDITS, although it is not directly a part of the ecommerce events.

However, note that the Android device mode integration does not support this mapping.

Content event mapping

The following table lists the mapping between the RudderStack events and the Branch Content events:

RudderStack eventBranch event
Products SearchedSEARCH
Product ViewedVIEW_ITEM
Product List ViewedVIEW_ITEMS
Product ReviewedRATE
Product SharedSHARE
Initiate StreamINITIATE_STREAM
Complete StreamCOMPLETE_STREAM
info
The above mentioned events are a part of the RudderStack ecommerce events but are mapped to Branch’s Content events.

Lifecycle event mapping

RudderStack supports mapping the following Branch lifecycle events:

RudderStack eventBranch event
Complete RegistrationCOMPLETE_REGISTRATION
Complete TutorialCOMPLETE_TUTORIAL
Achieve LevelACHIEVE_LEVEL
Unlock AchievementUNLOCK_ACHIEVEMENT
InviteINVITE
LoginLOGIN
Start TrialSTART_TRIAL
SubscribeSUBSCRIBE

Reset

The reset method resets the previously identified user and related information.

A sample reset call is shown:

[[RSClient getInstance] reset];

Property mappings

The following table lists the mapping of the accepted RudderStack properties common to all events:

RudderStack propertyBranch property
title$og_title
description$og_description
image_url$og_image_url
canonical_identifier$canonical_identifier
publicly_indexable$publicly_indexable
price$price
locally_indexable$locally_indexable
quantity$quantity
sku$sku
name$product_name
brand$product_brand
category$product_category
variant$product_variant
rating_average$rating_average
rating_count$rating_count
rating_max$rating_max
creating_timestamp$creation_timestamp
exp_date$exp_date
keywords$keywords
address_street$address_street
address_city$address_city
address_region$address_region
address_country$address_country
address_postal_code$address_postal_code
latitude$latitude
longitude$longitude
image_captions$image_captions
condition$condition

FAQ

Where can I find the Branch key?

To retrieve your Branch key, follow these steps:

  1. Log into your Branch dashboard.
  2. Go to Account Settings > Profile.
  3. You can find the Branch Key under Branch Key and Secret section:
Branch key

Questions? Contact us by email or on Slack