Braze Destination
Braze quick info
Braze accepts Track, Page, Identify, and Group calls. If you reference it in the Integrations object, call it “Appboy", or "Braze”.
Braze accepts cloud-mode data from all Segment source types. It can accept device-mode data from both web and mobile sources. You can change the Braze connection mode for Analytics.js sources from the destination settings in the Segment web app.
Braze, formerly Appboy, is an engagement platform that empowers growth by helping marketing teams to build customer loyalty through mobile, omni channel customer experiences.
The Braze Destination is open-source on GitHub. You can browse the code on GitHub: iOS, Android (Android and iOS maintained by Braze), Web, Server (Web and Server maintained by Segment). If you find any issues for mobile platforms, let Braze know, if the issues appear on web or server, let us know.
There are three major versions of the Braze SDK
If you are migrating from version 1 to version 2, see important notes regarding migration from Version 1 to Version 2.
If you notice any gaps or outdated information in this document, or simply want to leave some feedback to help us improve, let us know!
Getting Started
Before you start, make sure Braze 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 “Braze” in the Catalog, select it, and choose which of your sources to connect the destination to.
- In your Segment Settings UI, add the “API Key” which can be found in your Braze Dashboard under App Settings > Manage App Group.
- You will also need to set up a new App Group REST API Key in the Braze Dashboard under App Settings > Developer Console > API Settings. Instructions can be found here. Note: For this App Group REST API Key, you will only need to select users.track endpoint under “User Data”
- If you are implementing using Analytics.js, Segment will automatically load the Braze Web SDK. Otherwise, depending on the source you’ve selected, include Braze’s library by adding the following lines to your dependency configuration.
iOS
-
Add the Braze Segment Pod to your
Podfile
:pod 'Segment-Appboy'
We recommend using the latest version on CocoaPods since it will contain the most up to date features and bug fixes.
-
Next, declare Braze’s destination in your app delegate instance:
SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:@"YOUR_WRITE_KEY_HERE"]; [config use:[SEGAppboyIntegrationFactory instance]]; [SEGAnalytics setupWithConfiguration:config];
Here is a sample project which shows how to integrate the above.
Sample App
Braze created a sample iOS application that integrates Braze using Segment. Check it out at the GitHub repo.
Additional device-mode set up for iOS 14 support
Segment’s Braze SDK was updated to use AppBoy’s version 3.26.1 to prepare for iOS 14. Braze will continue to allow apps to provide a user’s IDFA value to the Braze SDK. The ABK_ENABLE_IDFA_COLLECTION
macro, which would conditionally compile in optional automatic IDFA collection, will be removed in Braze’s iOS 14 release.
See the Braze iOS 14 SDK Upgrade Guide for more information.
To use the latest Braze SDK to collect IDFAs you must do the following:
- Upgrade to use Xcode12.
- Update your Segment Appboy SDK to version 3.3.0 or greater.
- Import and implement the AppTrackingTransparency (ATT) Framework.
- Navigate to your project
Info.plist
and add a “Privacy - Tracking Usage Description”. This description appears in a popup when the application initializes in iOS 14. Users are prompted to indicate whether or not they want to allow tracking.
- Navigate to your project
- Implement Braze’s
ABKIDFADelegate
. For more information on how to implement this see Braze’s IDFA Collection documentation. - Follow Segment’s guide for collecting IDFA
Android
-
In your top-level project
build.gradle
add the following as a repository under allprojects > repositories.maven { url "http://appboy.github.io/appboy-android-sdk/sdk" } maven { url "http://appboy.github.io/appboy-segment-android/sdk" }
-
Add the Braze Segment destination dependency to your app
build.gradle
:compile 'com.appboy:appboy-segment-integration:+'
We recommend using the latest version on Maven since it will contain the most up-to-date features and bug fixes.
Note: Our
groupId
iscom.appboy
and notcom.segment.analytics.android.integrations
. -
Next, declare Braze’s destination in your
Analytics
instance:
Analytics analytics = new Analytics.Builder(context, "YOUR_WRITE_KEY_HERE")
.use(AppboyIntegration.FACTORY)
...
.build();
Sample App
Braze has created a sample Android application that integrates Braze using Segment. Check it out at the GitHub repo.
React Native device-mode set up
To add the Braze device-mode SDK to a React Native project:
- Navigate to the root folder of your project, and run a
yarn add appboy
command to add the destination SDK to your project. - Add an
import
statement to your project, as in the example below.import Braze from '@segment/analytics-react-native-appboy'
- 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: Braze // ... })
- Finally, change to your iOS development folder (
cd ios
) and runpod install
.
Braze was formerly known as “Appboy”, and their React component still uses that name. Be sure to use the old name!
Page
If you’re not familiar with the Segment Specs, take a look to understand what the Page method does. An example call would look like:
analytics.page();
Page calls are only sent to Braze if you have enabled either “Track All Pages” or “Track Only Named Pages” within your Segment Settings UI. They will be sent as a custom event.
Identify
Tip
Add Segment’s open-source Middleware tool to optimize your integration. This tool limits Data Point use by debouncing duplicate identify() calls from Segment. For more information, see the project’s README.
If you’re not familiar with the Segment Specs, take a look to understand what the Identify method does. An example call would look like:
analytics.identify('ze8rt1u89', {
firstName: 'Jane',
lastName: 'Kim',
email: 'jane.kim@example.com'
});
When you Identify a user, Segment passes that user’s information to Braze with userId
as Braze’s External User ID.
If you are using a device-mode connection, Braze’s SDK also automatically assigns a braze_id
to every user. This allows Braze to capture anonymous activity from the device by matching on braze_id
instead of userId
. This only applies to device-mode connections.
To send anonymous user data in cloud-mode, you must manually include the user’s braze_id
in all your Segment API calls in the integrations.Braze.braze_id
or context.integrations.Braze.braze_id
object.
Tip
Braze is complex. If you decide to use the braze_id
, consider contacting Segment Success Engineering or a Solutions Architect to validate your Braze implementation.
Segment’s special traits recognized as Braze’s standard user profile fields (in parentheses) are:
Segment Event | Braze Event |
---|---|
firstName |
first_name |
lastName |
last_name |
birthday |
dob |
avatar |
image_url |
address.city |
home_city |
address.country |
country |
gender |
gender |
All other traits (except their reserved user profile fields) will be sent to Braze as custom attributes. You can send an array of strings as trait values but not nested objects.
Track
Tip
To lower Data Point use, send only the Events which are relevant for campaigns and segmentation to the Braze destination. For more information, see /docs/protocols/schema/.
If you’re not familiar with the Segment Specs, take a look to understand what the Track method does. An example call would look like:
analytics.track('Purchased Item', {
product_id: '1234',
name: 'bag'
})
When you track
an event, we will send that event to Braze as a custom event. Note that Braze does not support arrays or nested objects for custom track event properties.
Note: Braze requires that you include a userId
or braze_id
for all calls made in cloud-mode. Segment only sends a braze_id
if a userId
is missing. When you use a device-mode connection, Braze automatically tracks anonymous activity using the braze_id
if a userId
is missing.
Note: We will remove the following custom properties as they are reserved by Braze and the message will be rejected if you tried to send any of them:
time
product_id
quantity
event_name
price
currency
Order Completed
When you track
an event with the name Order Completed
using the e-commerce tracking API, we will send the products you’ve listed to Braze as purchases.
Purchases
When you pass ecommerce events, the name of your event will be used as the productId
in Braze. An example of a purchase event would look like:
analytics.track('Purchased Item', {
revenue: '2000',
currency: 'USD'
})
The example above would have “Purchased Item” as its productId
and includes two required properties that you must pass in:
revenue
currency
Braze supports a currency codes as specified in their documentation. Be aware that any currency reported other than USD will still be shown in your Braze UI in USD based on the exchange rate on the date it was reported.
You can add more product details in the form of key-value pairs to the properties
object. However, the following reserved keys will not be passed to Braze if included in your Track call’s properties
object:
time
product_id
quantity
event_name
price
Group
If you’re not familiar with the Segment Specs, take a look to understand what the Group method does. An example call would look like:
analytics.group("1234", {
name: "Initech",
industry: "Technology",
employees: 329,
plan: "enterprise",
totalBilled: 830
});
When you call group
, we will send a custom attribute to Braze 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
.
Other Features
In-app Messaging
Mobile
In-app messages will be registered for and requested by default. This functionality can be disabled by disabling the Enable Automatic In-App Message Registration setting. This is only available for users of the Braze Mobile SDKs.
Web
Instructions on how to set this up within Braze can be found in their docs. Once setup, it allows you to trigger in-app message display as a result of several different event types. By default, all In-App Messages that a user is eligible for are automatically delivered to the user upon a session start event. A new session automatically starts when a user loads your site. If you’d like to force a new session for a user, simply make an identify with the corresponding userId for that user.
If you don’t want your site to immediately display new In-App Messages when they’re received, you can disable automatic display and register your own display subscribers. To do this:
-
Disable your Automatically Send In-App Messages Destinations setting. By default, it is enabled when you enable the Braze destination.
-
Create your subscriber by calling:
analytics.ready(function() { window.appboy.subscribeToNewInAppMessages(function(inAppMessages) { // Display the first in-app message. You could defer display here by pushing this message to code within in your own application. // If you don't want to use Appboy's built-in display capabilities, you could alternatively pass the in-app message to your own display code here. window.appboy.display.showInAppMessage(inAppMessages[0]); // Return an array with any remaining, unhandled messages to appboy's internal queue. // These will be part of the inAppMessages param the next time this subscriber is invoked. return inAppMessages.slice(1); }); });
The inAppMessages
parameter will be an array of appboy.ab.InAppMessage
subclass or appboy.ab.ControlMessage
objects, each of which has various lifecycle event subscription methods.
Push Notifications
iOS
- Follow the directions to register for push at in Segment’s iOS library docs.
-
Add the following to your application:didFinishLaunchingWithOptions
[[SEGAppboyIntegrationFactory instance] saveLaunchOptions:launchOptions];
- In your application’s application:didReceiveRemoteNotification: method, add the following:
[[SEGAnalytics sharedAnalytics] receivedRemoteNotification:userInfo];
- If you integrated the application:didReceiveRemoteNotification:fetchCompletionHandler: in your app, add the following to that method:
if ([Appboy sharedInstance] == nil) { [[SEGAppboyIntegrationFactory instance] saveRemoteNotification:userInfo]; }
- If you implemented handleActionWithIdentifier:forRemoteNotification:, add the following to that method:
if ([Appboy sharedInstance] == nil) { [[SEGAppboyIntegrationFactory instance] saveRemoteNotification:userInfo]; }
-
If you are using the
UserNotification
framework, follow Braze’s documentation to register push notifications using theUserNotification
framework. Then in your application’suserNotificationCenter:didReceiveNotificationResponse:withCompletionHandler
method, add the following:if ([Appboy sharedInstance] == nil) { [[SEGAppboyIntegrationFactory instance].appboyHelper saveUserNotificationCenter:center notificationResponse:response]; } [[SEGAppboyIntegrationFactory instance].appboyHelper userNotificationCenter:center receivedNotificationResponse:response]; if (completionHandler) { completionHandler(); }
Android
- Follow the directions in Braze’s push notification docs.
-
If you don’t have Braze automatically register for push (i.e. you pass the push token from an FCM or manual GCM registration) you need to ensure you call
registerAppboyPushMessages
after Braze is initialized. You can do this by checking if Braze is initialized before trying to pass the push token, and waiting for initializing to set if not.You can do this in an
onIntegrationReady
method:String appboyPushToken; bool appboyInitialized = false; … // When you get the push token String receivedToken; appboyPushToken = recievedToken; if (appboyInitialized) { Appboy.getInstance(getContext()).registerAppboyPushMessages(appboyPushToken); } …. Analytics.with(this).onIntegrationReady(Appboy, new Callback() { @Override public void onIntegrationReady(Object integration) { appboyInitialized = true; if(appboyPushToken != null) { Appboy.getInstance(getContext()).registerAppboyPushMessages(appboyPushToken); } } });
Client
-
To support push notifications on Chrome, you’ll need to enable FCM/GCM as well as configure your site. Check out steps one and two here, for detailed instructions on both.
-
Browser Registration. In order for a browser to receive push notifications, you must register it for push by calling:
analytics.ready(function() { window.appboy.registerAppboyPushMessages(); });
Note: We recommend placing this snippet outside of your Segment Snippet within your
script
tag.Note: This will immediately request push permission from the user.
To show your own push-related UI to the user before requesting push permission (known as a soft push prompt), you can test to see if push is supported in the user’s browser by calling:
analytics.ready(function() {
if (window.appboy.isPushSupported()) {
// Add your push logic
}
});
Braze recommends checking to see if this returns true
since not all browsers can recieve push notifications. See below for instructions on setting up a soft push prompt using Braze In-App Messages.
To unsubscribe a user, call:
analytics.ready(function() {
window.appboy.unregisterAppboyPushMessages();
});
-
Set your GCM/FCM server API key and SenderID on the Braze dashboard. You can find more details for this here.
-
To support push notifications on Safari, add your Website Push ID into your Segment Settings UI and we’ll send it for you when we initialize the Braze Web SDK. To get your Website Push ID, follow the first two bullet points in these instructions.
Soft Push Prompts
-
Follow step one to create a “Prime for Push” in-app messaging Campaign on the Braze dashboard.
-
Disable your Automatically Send In-App Messages Destination setting. By default, it is enabled when you enable the Braze destination.
-
Add the following snippet to your site:
analytics.ready(function() {
window.appboy.subscribeToNewInAppMessages(function(inAppMessages) {
var message = inAppMessages[0];
if (message != null) {
var shouldDisplay = true;
if (message instanceof appboy.ab.inAppMessage) {
// Read the key/value pair for msg-id
var msgId = message.extras["msg-id"];
// If this is our push primer message
if (msgId == "push-primer") {
// We don't want to display the soft push prompt to users on browsers that don't support push, or if the user
// has already granted/blocked permission
if (!appboy.isPushSupported() || appboy.isPushPermissionGranted() || appboy.isPushBlocked()) {
shouldDisplay = false;
}
// Prompt the user when the first button is clicked
message.buttons[0].subscribeToClickedEvent(function() {
appboy.registerAppboyPushMessages();
});
}
}
// Display the message
if (shouldDisplay) {
appboy.display.showInAppMessage(message);
}
}
// Remove this message from the array of IAMs and return whatever's left
return inAppMessages.slice(1);
});
});
For more details on this snippet, check out the Braze’s docs here.
Note: We recommend placing this snippet outside of your Segment Snippet within your script
tag.
- When you’d like to display the Soft Push to a user, call:
analytics.ready(function() {
window.appboy.logCustomEvent("prime-for-push")
});
Enable IDFA collection
To enable IDFA collection in Braze, add following lines to your Podfile
:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if target.name == "Appboy-iOS-SDK"
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)', 'ABK_ENABLE_IDFA_COLLECTION']
end
end
end
end
end
Migrating to v2 of the Braze Web SDK
There are currently three major versions of this SDK: 1, 2, and 3. Segment currently supports both as migrating to Version 2+ requires some important changes to your website.
If you have never implemented Braze on your site, either using Segment or natively, you can ignore this section. If you have had Braze running before and want to migrate to Version 2+ you must ensure you remove all references to appboy.min.css
from your site. This is very important as it will cause issues with Version 2+ of their SDK. Once you have done this you can select Version 2+ using the “Braze Web SDK Version” with your Segment Settings UI.
Using Braze with Personas
You can send computed traits and audiences created in Personas to Braze, and use them to run personalization campaigns or power messages to users.
Personas sends event data about your users to Braze using an identify
call and/or track
call.
Computed Traits in Braze
You can send computed traits to Braze as custom attributes or as custom events.
- If you send a computed trait using the
identify
call, they appear in Braze as custom attributes. - If you send a computed trait using the
track
call, they appear in Braze as custom events.
You can choose which method to use (or choose to use both) when you connect the computed trait to the Braze destination.
Computed Traits using Identify calls
You can send computed traits created in Personas as identify
calls to create custom attributes in Braze. The custom attribute is set to the value of the computed trait. The custom attribute name appears as the snake_cased version of the computed trait name you provide.
For example, if you have a Personas computed trait for “Last Product Viewed Item,” that would be named “last_product_viewed_item” in the user’s Personas profile.
If the “Last Product Viewed Item” trait is connected to Braze to send identify
calls, as in this example:
The following custom attribute, “last_product_viewed_item” appears in Braze on the user’s profile:
Computed Traits using Track calls
You can also send computed traits created in Personas as track
calls to create custom events in Braze. When a Personas calculates a computed trait for a user, it sends a Trait Computed
event to Braze.
Using the same example as above, if a user has a computed trait for “Last Product Viewed Item” and the trait is connected to Braze and configured to send track
calls:
The following custom event appears in Braze on the user’s profile:
Tip
You can change the name of the “computed trait” event that Braze receives in the Personas Destination Connection Settings.
Audiences in Braze
You can send Audiences to Braze as custom attributes or custom events.
- When you send an Audience using the
identify
call, it appears in Braze as a custom attribute. - When you send an Audience using the
track
call, it appears in Braze as a custom event.
You can choose which method to use (or choose both) when you connect the audience to the Braze destination.
Audiences using Identify calls
You can send audiences created in Personas as identify
calls to create custom attributes in Braze. If a user is added to an audience, Personas sends a custom attribute to Braze with a value of true
. The custom attribute name is be the snake_cased version of the audience name in Personas.
For example, if a user is in a “Dormant Shoppers” audience:
And the “Dormant Shoppers” audience is connected to Braze to send identify
calls:
The “dormant_shoppers” custom attribute appears in Braze on the user’s profile:
Audiences using Track calls
You can also send audiences created in Personas as track
calls to create custom events in Braze. If a user is added to an audience, Personas sends an Audience Entered
event to Braze. If a user leaves the audience (because they no longer satisfy the criteria) Personas sends an Audience Exited
event to Braze.
Using the same example as above, if a user is in a “Dormant Shoppers” audience and the audience is connected to Braze to send track
calls, Personas sends the following “Audience Entered” and “Audience Exited” events. (You can edit the names of these events from this screen.)
The following custom event appears in Braze on the user’s profile when they enter the audience:
Tip
You can change the name of the “Audience Entered” event that Braze receives in the Personas Destination Connection Settings.
Setting up Personas with Braze
To send computed traits or audiences to Braze, you first must connect it to your Personas space. Once it’s set up, you can select Braze as a destination for Personas data each time you create new computed traits or audiences.
- Navigate to the Destinations tab in your Personas space.
- Search for Braze and add the destination to your Personas space.
- On the set up screen, enter in your App Identifier, REST API Key and Datacenter for Braze.
Braze Personas Quick Info
- Personas Destination type: Event - data is delivered to this Destination one-by-one on a realtime basis
- Support for Track and Identify?: Yes, both are supported.
- Traits and Audiences created by: Computed traits and audiences are added as custom attributes using
identify
calls. You can also send computed traits and audiences as custom events usingtrack
calls. - Must create audience_name field before Personas can update those values?: No. If sent as an
identify
call, Personas automatically creates the computed trait or audience name as a custom attribute in Braze. If sent as atrack
call, Personas automatically creates a custom event in Braze. - Computed trait appears as: A snake cased version of the computed trait name (for example,
last_product_viewed: 'Sweater'
) with a string for the value of the computed trait. - Audience appears as: A snake cased version of the audience name (for example,
order_completed_last_30days: true
) with a boolean value oftrue
indicates that a user is in the audience. - Destination rate limit: 100 requests per second (this is at the Personas Space-level, i.e. shared across all Audiences & Computed Traits syncing from 1 Personas Space to Braze. This rate limit would not be shared by multiple Personas Spaces.)
- Lookback window allowed: Yes, unlimited.
- Identifiers required :
userId
orbraze_id
- Identifiers accepted :
userId
orbraze_id
- Client or Server-Side Connection: Server-side connection for Personas
Debounce with Middlewares
If you use the Braze destination in either cloud or device mode you can save Braze costs by “debouncing” duplicate identify()
calls from Segment by adding our open-source Middleware tool to your implementation. More information about this tool and how it works is available in the project’s README.
Braze Personas FAQs
Which ID does Segment match on when sending data to Braze?
By default, Personas data is sent to Braze by matching the userId
. The Segment userId
maps to Braze’s External ID. If the user is anonymous and does not have a userId
, you can also choose to send data using the braze_id
auto-generated by Braze. To use braze_id
, you must pass the braze_id
to Segment as a Segment externalId in the context.integrations.Braze.braze_id
object. If braze_id
is sent as an externalId
and userId
is missing, Personas matches on braze_id
when sending to Braze. You can check the Identities tab on a user’s Personas profile to confirm that braze_id
was successfully picked up as an externalId
.
You can find the braze_id
in the Braze UI or by using Braze’s Users by Identifier API Endpoint.
Do Personas audiences sync with Braze Segments?
No. Audiences are sent to Braze as either custom attributes or custom events. You can use these events and attributes when building your Braze Segments and Campaigns.
How long do my computed traits and audiences exist in Braze?
All Braze user profile data (including custom events, custom attributes) is stored for as long as those profiles are active.
What happens if I delete a computed trait or audience in Segment?
When you delete an audience or trait in Segment they are not deleted from Braze. Data sent to Braze is immutable and cannot be deleted or modified once they receive it. However, you can blocklist custom attributes and events in Braze.
Settings
Segment lets you change these destination settings from the Segment app without having to touch any code.
Allow Crawler Activity
Web Only: By default, the Braze Web SDK ignores activity from known spiders or web crawlers, such as Google, based on the user agent string. This saves datapoints, makes analytics more accurate, and may improve page rank. However, if you want Braze to log activity from these crawlers instead, you may set this option to true.
App Identifier
The API key found in your Braze dashboard, used to identify your application as the app identifier. (Formerly ‘API Key’)
Appboy Datacenter
Choose your Appboy Gateway (ie. US 01, US 02, EU 01, etc.).
Automatically Send In-App Messages
Web Only: When this is enabled, all In-App Messages that a user is eligible for are automatically delivered to the user. If you’d like to register your own display subscribers or send soft push notifications to your users, make sure to disable this option.
Braze Web SDK Version
Web Only: The major version of the Braze web SDK you would like to use. Please reference their changelog for more info. Please ensure you read this section of our documentation carefully before changing this setting.
Custom API Endpoint
If you’ve been assigned an API endpoint by the Braze team specifically for use with their Mobile or Javascript SDKs, please input that here. It should look something like: sdk.api.appboy.eu. Otherwise, leave this blank.
Custom REST API Endpoint
If you’ve been assigned an API endpoint by the Braze team specifically for use with their REST API, please input that here. It should look something like “https://foo.bar.braze.com”. Otherwise, leave this blank.
Do Not Load Font Awesome
Web Only: Braze uses FontAwesome for in-app message icons. By default, Braze will automatically load FontAwesome from https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css. To disable this behavior (e.g. because your site uses a customized version of FontAwesome), set this option to true. Note that if you do this, you are responsible for ensuring that FontAwesome is loaded on your site - otherwise in-app messages may not render correctly. This setting is only applicable if you are using version 2 of the Braze Web SDK.
Enable Automatic In-App Message Registration
Mobile Only: Every activity in your app must be registered with Braze to allow it to add in-app message views to the view hierarchy. By default, Braze’s Segment integration automatically registers every activity. However, if you would like to manually register activities, you may do so by disabling this setting. For more information, see the Braze documentation.
Enable HTML In-App Messages
Web only: Enabling this option will allow Braze dashboard users to write HTML In-App messages. Check out Braze Documentation for more information on this setting. This setting is only applicable if you are using version 2 of the Braze Web SDK.
Enable Logging
Web Only: Set to true to enable logging by default. Note that this will cause Braze to log to the javascript console, which is visible to all users! You should probably remove this or provide an alternate logger with appboy.setLogger() before you release your page to production. This setting is only applicable if you are using version 2 of the Braze Web SDK.
Log Purchase when Revenue is present
When this option is enabled, all Track calls with a property called revenue
will trigger Braze’s LogRevenue event.
Minimum Interval Between Trigger Actions In Seconds
Web Only: By default, a trigger action will only fire if at least 30 seconds have elapsed since the last trigger action. Provide a value for this configuration option to override that default with a value of your own. We do not recommend making this value any smaller than 10 to avoid spamming the user with notifications. This setting is only applicable if you are using version 2 of the Braze Web SDK.
Only Track Known Users
Web Only If enabled, this new setting delays calling of window.appboy.initialize
until there is an identify call that includes a valid userId
. When enabled, events for anonymous users will no longer be sent to Braze.
Open In-App Messages In New Tab
By default, links from in-app message clicks load in the current tab or a new tab as specified in the dashboard on a message-by-message basis. Set this option to true to force all links from in-app message clicks open in a new tab or window. This setting is only applicable if you are using version 2 of the Braze Web SDK.
Open News Feed Cards In New Tab
By default, links from news feed cards load in the current tab or window. Set this option to true to make links from news feed cards open in a new tab or window. This setting is only applicable if you are using version 2 of the Braze Web SDK.
REST API Key
This can be found in your Braze dashboard under App Settings > Developer Console. (Formerly ‘App Group Identifier’)
Safari Website Push ID
Web Only: To send push notifications on Safari, Braze needs your Website Push Id. To get your Webite Push ID, check out the first two bullet points here.
Service Worker Location
Specify your serviceWorkerLocation
as defined in the Braze Web SDK documentation: https://js.appboycdn.com/web-sdk/latest/doc/module-appboy.html
Session Timeout In Seconds
Web Only: By default, sessions time out after 30 seconds of inactivity. Input a value for this configuration option to override that default with a value of your own. For example, to override the setting from 30 seconds to 30 minutes, input the value 1800. This setting is only applicable if you are using version 2 of the Braze Web SDK.
Track All Pages
This will send all page
calls to Braze as a Loaded/Viewed a Page event. This option is disabled by default since Braze isn’t generally used for page view tracking.
Track Only Named Pages
This will send only page
calls to Braze that have a name
associated with them. For example, page('Signup')
would translate to Viewed Signup Page in Braze.
Update Existing Users Only
Server Side only: A flag to determine whether to update existing users only, defaults to false
Adding Braze to the integrations object
To add Braze to the integrations
JSON object (for example, to filter data from a specific source), use one of the following valid names for this integration:
-
Appboy
-
Braze
This page was last modified: 06 May 2021
Need support?
Questions? Problems? Need more info? Contact us, and we can help!