Skip to content

Repository files navigation

RudderStack
The Customer Data Platform for Developers

Website · Documentation · Community Slack


Braze Integration

The Braze integration allows you to send your event data from RudderStack to Braze for customer engagement, marketing automation, and analytics.

This SDK fully supports both Swift and Objective-C and can be used seamlessly in either type of project.

Installation

Swift Package Manager

Add the Braze integration to your Swift project using Swift Package Manager:

  1. In Xcode, go to File > Add Package Dependencies add_package_dependency

  2. Enter the package repository URL: https://github.com/rudderlabs/integration-swift-braze in the search bar

  3. Select the version you want to use image

  4. Select the target to which you want to add the package

  5. Finally, click on Add Package

    image

Alternatively, add it to your Package.swift file:

// swift-tools-version:5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "YourApp",
    products: [
        .library(
            name: "YourApp",
            targets: ["YourApp"]),
    ],
    dependencies: [
        // Add the Braze integration
        .package(url: "https://github.com/rudderlabs/integration-swift-braze.git", .upToNextMajor(from: "<latest_version>"))
    ],
    targets: [
        .target(
            name: "YourApp",
            dependencies: [
                .product(name: "RudderIntegrationBraze", package: "integration-swift-braze")
            ]),
    ]
)

Supported Native Braze SDK Version

This integration supports Braze iOS SDK version:

>=18.2.0, <19.0.0

Use Xcode 26 or later. See Migrating to 2.0.0 before upgrading from 1.x.

Platform Support

The integration supports the following platforms:

  • iOS 15.0+
  • tvOS 15.0+

Usage

Initialize the RudderStack SDK and add the Braze integration:

import RudderStackAnalytics
import RudderIntegrationBraze

class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        // Initialize the RudderStack Analytics SDK
        let config = Configuration(
            writeKey: "<WRITE_KEY>",
            dataPlaneUrl: "<DATA_PLANE_URL>"
        )
        let analytics = Analytics(configuration: config)

        // Add Braze integration
        analytics.add(plugin: BrazeIntegration())

        return true
    }
}

Replace:

  • <WRITE_KEY>: Your project's write key from the RudderStack dashboard
  • <DATA_PLANE_URL>: The URL of your RudderStack data plane

Recommended ecommerce events

The integration can map supported RudderStack ecommerce track events to Braze recommended ecommerce events (ecommerce.*). This is opt-in via the useEcommerceRecommendedEvents destination flag (configured in the RudderStack dashboard) and defaults to off — when off, track handling is unchanged.

When enabled, the following events are mapped:

RudderStack event Braze event action
Product Viewed ecommerce.product_viewed
Product Added ecommerce.cart_updated add
Product Removed ecommerce.cart_updated remove
Checkout Started ecommerce.checkout_started
Order Completed ecommerce.order_placed
Order Refunded ecommerce.order_refunded
Order Cancelled ecommerce.order_cancelled

Notes:

  • Event names match case-insensitively after trimming. Cart Viewed and Cart Updated are not mapped and fall through to the generic custom-event path.
  • With the flag on, Order Completed emits ecommerce.order_placed instead of the legacy purchase call.
  • The mapping never drops or rejects an event: values are coerced to Braze's expected type where the conversion is lossless, unmapped properties are preserved under metadata, and missing required fields or type mismatches are surfaced as warnings while the event is still sent.

Contact us

For more information:

Follow Us

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages