About Segment

Braze is dedicated to creating partner integrations that allow you to send data from multiple sources to your Dashboard. Segment is an analytics data hub that allows you to track your users and route that data to a wide variety of user analytics providers, such as Braze. We offer both a side-by-side SDK integration for your Android, iOS and web applications and a server-to-server integration for your backend services so that you can start building richer user profiles.

If you’re looking for information on the Currents integration with Segment, click here.

Pre-Requisites

Requirement Origin Access Description
Segment Account & Account Information Segment https://app.segment.com/login You must have an active Segment Account to utilize their services with Braze.

Braze Settings in Segment

When configuring Braze from Segment, you’ll have many options to customize the flow of data between Braze and Segment.

Connection Settings

Name Description
App Identifier Once called the API Key. Found in the Developer Console.
REST API Key Once called the “App Group Identifier”. Found in the Developer Console.
Custom API Endpoint Given to you by your Braze support or account representative. For example: https://sdk.api.braze.com. If you were not given a custom API Endpoint, leave this setting blank.
Appboy Datacenter This is your Braze Instance. Select it from the drop down.
Custom REST API Endpoint Given to you by your Braze support or account representative. For example: https://rest.iad.braze.com. If you were not given a custom API Endpoint, leave this setting blank.
Safari Website Push ID Safari requires a Website Push ID to send push. More on this here.
Braze Web SDK Version Which version of the Braze Web SDK you have integrated. You should have found this out during your initial integration process, but if you’re unsure, reach out to your account manager or Braze support.

Optional Settings

Name Options Description
Allow Crawler Activity On/Off (True/False) Web Crawlers are automatic programs that visit websites, read then, and collect information that might be important for a search engine index. You can either allow or disallow this from your integrated web page or app. Braze disallows this by default.
Automatically Send In-App Messages On/Off (True/False) Braze automatically enables you to send push to your users upon proper integration.
Do Not Load Font Awesome On/Off (True/False) Braze uses FontAwesome for our in-app message icons, but you may disallow this feature at any time.
Enable HTML In-App Messages On/Off (True/False) Enables Braze platform users to write HTML in-app messages. More information in the JS Docs.
Enable Logging On/Off (True/False) Log to the Javascript console by default.
Minimum Interval Between Trigger Actions In Seconds Any Number By default, trigger actions will only fire if 30 seconds have elapsed since the last trigger action.
Open In-App Messages in New Tab On/Off (True/False) By default, links from in-app message clicks load in the current tab or a new tab as specified in the Braze platform.
Open News Feed Cards in New Tab On/Off (True/False) By default, links from news feed cards or content cards load in the current tab or a new tab as specified in the Braze platform.
Session Timeout In Seconds Any Number By default, sessions time out after 30 minutes of inactivity.
Track All Pages On/Off (True/False) Sends all Segment page calls to Braze as Page Events.
Track Only Named Pages On/Off (True/False) Sends all named Segment page calls to Braze
Update Existing Users Only On/Off (True/False) This only applies to Server Side integrations. This determines whether or not all users vs. existing users will be updated. This defaults to false.

Side-by-Side SDK Integration

Braze’s side-by-side integration maps Segment’s SDK to ours, allowing access to deeper features and a more comprehensive usage of Braze than the server-to-server integration. These mappings of Segment’s SDK for Android, iOS and Analytics.js (Segment’s Javascript SDK) are open source and can be found on our GitHub page.

To complete the side-by-side integration, please refer to Segment’s detailed instructions for Android and iOS. For Braze’s Web SDK, Segment’s Analytics.js library dynamically pulls in and initializes our Web SDK when you add Braze as a destination on your Segment dashboard. However, to use Braze’s browser notification capabilities, please refer to Segment’s Web documentation.

Segment's Dashboard UI

The keys required to input in Segment’s dashboard can be found in the Developer Console under the ‘API Settings’ tab.

Braze Developer Console - API Settings

For more details regarding Braze’s SDKs, please refer to our iOS, Android and Web documentation.

Server-to-Server Integration

The server-to-server integration forwards data from Segment to Braze’s REST API. This integration is only used in association with Segment’s server-side libraries, such as their Ruby or Go SDKs. Enable the integration by setting your App Group’s REST API Key and Braze’s REST API endpoint for your corresponding data center in your destination settings on Segment’s dashboard.

Segment's Go Integration

Unlike the side-by-side integration, however, the server-to-server integration does not support any of Braze’s UI features, such as in-app messaging, News Feed, Feedback or push notifications.

Getting Started

Once the Segment library is integrated with your server, and Braze is added as a destination on your Segment dashboard, you can begin routing data.

Braze supports the identify, track, and group methods; however, our REST APIs require you to include a user ID when making these calls.

Identify

When you identify a user, we will record information for that user with userId as the External User ID. Segment’s special traits recognized as Braze’s standard user profile fields (in parentheses) are firstName (first_name), lastName (last_name), birthday (dob), avatar (image_url), address.city (home_city), address.country (country), and gender (gender). All other traits will be recorded as custom attributes.

When passing user attribute data, please be sure that you are only passing values for attributes that have changed since the last update. This will ensure that you do not unnecessarily consume data points towards your allotment.

Track

When you track an event, we will record that event as a custom event using the name provided.

Completed Order

When you track an event with the name Completed Order using the format described in Segment’s ECommerce API, we will record the products you’ve listed as purchases.

Group

When you call group, we will record a custom attribute with the name ab_segment_group_<groupId>, where groupId is the group’s ID in the method’s parameters. For example, if the group’s ID is 1234, then the custom attribute name will be ab_segment_group_1234. The value of the custom attribute will be set to true.

Enabling Push Notifications

Currently, Braze’s server-to-server integration with Segment does not support methods for push tokens. In order to enable push notifications in Braze, you must import push tokens via the User Attribute Object of our User Data REST API.

How To Tell If You’re Receiving Data From Segment

Some automatically captured data is only available through the side-by-side integration. The following data is not available via the server-to-server integration:

  • Sessions
  • First Used App
  • Last Used App

Consequently, most of your app usage dashboard (lifetime sessions, MAU, DAU, Stickiness, Daily Sessions and Daily Sessions per MAU) will be blank even if Braze is receiving data from Segment.

You can view your data in the custom event dashboard, the revenue dashboard or by creating a segment. The custom event dashboard allows you to view custom event counts over time. Note that you will not be able to use formulas that include MAU and DAU statistics.

If you’re sending purchase data to Braze (see Completed Order), the revenue dashboard allows you to view data on revenue or purchases over specific periods of time or your app’s total revenue.

Creating a segment allows you to filter your users based on custom event data and custom attribute data. Note that filters related to automatically collected session data (such as “first used app” and “last used app”) will not work.

WAS THIS PAGE HELPFUL?
New Stuff!