You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Braze](https://www.braze.com/), formerly Appboy, is an engagement platform that empowers growth by helping marketing teams to build customer loyalty through mobile, omni-channel customer experiences.
6
+
[Branch](https://branch.io/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners){:target="_blank”} empowers you to increase mobile revenue with enterprise-grade links built to acquire, engage, and measure customers across all devices, channels, and platforms. An industry-leading mobile measurement and deep linking platform, trusted by top ranking apps to increase efficiency and revenue.
7
7
8
-
Braze’s destination plugin code is open source and available on GitHub. You can view it [here.](https://github.com/braze-inc/analytics-swift-braze). This destination plugin is maintained by Braze. For any issues with the destination plugin code, please reach out to Braze's support.
8
+
## Getting started
9
9
10
-
## Getting Started
10
+
1. From the Segment web app, click **Catalog**.
11
+
2. Search for "Branch Metrics" in the Catalog, select it, and choose which of your sources to connect the destination to.
12
+
3. On Branch side you will need to [sign up for a free Branch account](http://branch.io/signup?bmp=segment){:target="_blank”} and follow the steps on their Dashboard to complete set up.
13
+
4. Copy your `Branch Key` from the Settings page of your [Branch dashboard](https://dashboard.branch.io/#/settings){:target="_blank”}.
14
+
5. Paste the Branch Key in the destination settings and click **Save**.
11
15
12
16
13
-
1. From the Segment web app, click **Catalog**.
14
-
2. Search for "Braze" in the Catalog, select it, and choose which of your sources to connect the destination to.
15
-
3. In the Destination Settings, add the **API Key**, found in the Braze Dashboard in *App Settings > Manage App Group*.
16
-
4. Set up a new App Group REST API Key in the Braze Dashboard in *App Settings > Developer Console > API Settings*. For more information, see [Creating and Managing REST API Keys](https://www.braze.com/docs/api/basics/#creating-and-managing-rest-api-keys) in the Braze documentation.
17
-
- Select the `users.track` endpoint in the **User Data** section.
17
+
## Installation
18
+
19
+
You need to install the `@segment/analytics-react-native-plugin-branch` and the `react-native-branch` dependencies to use the Branch plugin.
Run `pod install` after the installation to autolink the Branch SDK.
32
+
33
+
See the [Branch React Native SDK](https://github.com/BranchMetrics/react-native-branch-deep-linking-attribution){:target="_blank”} docs for more information about this dependency.
34
+
## Usage
35
+
36
+
Follow the [instructions for adding plugins](https://github.com/segmentio/analytics-react-native#adding-plugins){:target="_blank”} on the main Analytics client.
37
+
38
+
In your code where you initialize the analytics client, call the `.add(plugin)` method with an `BranchPlugin` instance:
If you're not familiar with the Segment Spec, take a moment to understand what the [Identify method](/docs/connections/spec/identify/) does. An example call looks like this:
When you call `.identify('userId')`, Segment uses Branch's `setIdentity(userId)` method to send the `userId` that was passed in.
67
+
68
+
## Track
69
+
70
+
If you're not familiar with the Segment Spec, take a moment to understand what the [Track method](/docs/connections/spec/track/) does. An example call looks like this:
71
+
72
+
```ts
73
+
const { track } =useAnalytics();
74
+
75
+
track('View Product', {
76
+
productId: 123,
77
+
productName: 'Striped trousers',
78
+
});
79
+
```
80
+
81
+
When you call `track`, Segment translates it automatically and sends the event to Branch's `logEvent()` endpoint.
82
+
83
+
## Screen
84
+
If you're not familiar with the Segment Spec, take a look to understand what the [Screen method](/docs/connections/spec/screen/) does. An example call looks like this:
85
+
86
+
```ts
87
+
const { screen } =useAnalytics();
88
+
89
+
screen('ScreenName', {
90
+
productSlug: 'example-product-123',
91
+
});
92
+
```
93
+
Segment sends Screen Events to Branch's `logEvent()` endpoint.
0 commit comments