Branch Destination
Branch Metrics quick info
Branch Metrics accepts Page, Identify, and Track calls. If you reference it in the Integrations object, call it “Branch Metrics”.
Branch Metrics accepts device-mode data only from a mobile source.
Branch empowers you to increase mobile revenue with enterprise-grade links built to acquire, engage, and measure across all devices, channels, and platforms. An industry-leading mobile measurement and deep linking platform, trusted by the most top ranking apps to increase efficiency and revenue.
As of November 2019, the Branch mobile SDKs for Segment are in maintenance mode.
Existing users of the Branch SDKs are unaffected, however new installations must implement the Branch native SDK separately. They can then enable Branch’s data export integration to push additional data to Segment, and data import integration to pull additional Segment data into the Branch dashboard.
The legacy instructions for implementing the Branch mobile SDKs for Segment have been removed from this documentation. If you need access to the removed sections, you can view them here.
This destination is maintained by Branch. For any issues with the destination, contact the Branch support team.
This document was last updated on November 13, 2019. If you notice any gaps, outdated information or simply want to leave some feedback to help us improve our documentation, let us know!
Getting Started
Before you start, make sure Branch Metrics supports the source type and connection mode you’ve chosen to implement. You can learn more about connection modes here.
Web | Mobile | Server | |
---|---|---|---|
📱 Device-mode | ⬜️ | ✅ | ⬜️ |
☁️ Cloud-mode | ⬜️ | ⬜️ | ⬜️ |
- From the Segment web app, click Catalog.
- Search for “Branch Metrics” in the Catalog, select it, and choose which of your sources to connect the destination to.
- On Branch side you will need to sign up for a free Branch account and follow the steps on their Dashboard to complete set up.
- Copy your
Branch Key
from the Settings page of your Branch dashboard. - Paste the Branch Key in the destination settings and click Save.
Adding Branch device-mode SDKs for React Native
To add the Branch device-mode SDK to a React Native project:
- Navigate to the root folder of your project, and run a
yarn add branch
command to add the destination SDK to your project. - Add an
import
statement to your project, as in the example below.import Branch from '@segment/analytics-react-native-branch'
- In the same project file, add the destination to the
using
list in theawait
command.await analytics.setup('YOUR_WRITE_KEY', { // Add any of your Device-mode destinations. This ensures they load before continuing. using: Branch // ... })
- Finally, change to your iOS development folder (
cd ios
) and runpod install
.
Identify
If you’re not familiar with the Segment Specs, take a look to understand what the Identify method does. An example iOS call would look like:
[[SEGAnalytics sharedAnalytics] identify:@"12091906-01011992"
traits:@{ @"email": @"john.doe@example.com" }];
Track
If you’re not familiar with the Segment Specs, take a look to understand what the Track method does. An example iOS call would look like:
[[SEGAnalytics sharedAnalytics] track:@"Article Completed"
properties:@{ @"title": @"How to Create a Tracking Plan", @"course": @"Intro to Analytics" }];
Settings
Segment lets you change these destination settings from the Segment app without having to touch any code.
Setting | Description |
---|---|
Alternate Api Key Field | string , defaults to branch_key . |
Branch Secret (required) |
string . Required for server-side calls. Your Branch secret can be retrieved on the settings page of the Branch dashboard. |
Branch Key (required) |
string . Your Branch app key can be retrieved on the settings page of the Branch dashboard. |
Direct Integration Channels | array , defaults to server, client. The channels this direct integration supports. |
Endpoint | string , defaults to https://api.branch.io/v1/ingest/event/segment . |
This page was last modified: 03 May 2021
Need support?
Questions? Problems? Need more info? Contact us, and we can help!