Skip to content

Events

Learn about the different events in Braze and their purpose.

Braze leverages a few different event types to provide a comprehensive understanding of user behavior and engagement with your brand. Each type of event serves a unique purpose:

  • Standard events: Provide a basic understanding of user engagement with your app or site.
  • Purchase events: Crucial for understanding user purchasing behavior and for tracking revenue.
  • Custom events: Provide deeper insight into user behaviors that are unique to your app or business.

By tracking these different types of events, you can gain a deeper understanding of your users, which can inform your marketing strategies, help you optimize your app, and enable you to provide a more personalized user experience. Let’s dive in.

Standard events

In Braze, standard events are predefined actions that users can take within your app that Braze automatically tracks after you integrate the Braze SDK. Here are a few examples of standard events:

  • App launch
  • Purchase
  • Session start
  • Session end
  • Clicked push notification
  • Opened email

As a marketer, you can use these standard events to understand user behavior and engagement with your app. For instance, you can see how often users are launching your app, or how many purchases are being made. This information can be invaluable when it comes to creating targeted marketing campaigns.

It’s important to note that while standard events are automatically tracked by Braze, purchase events, custom events, and custom attributes need to be set up by your development team based on your specific needs and goals.

Purchase events

Purchase events are a way to record and track purchases made by your users. They are a type of standard event that is available by default after you integrate the Braze SDK. Because of this, when you use purchase events to track purchases, you can monitor your revenue over time and across different revenue sources directly from Braze.

Purchase events record the following key information about a purchase:

  • Product ID (typically the product name or category)
  • Currency
  • Price
  • Quantity

You can then use this data to segment your users based on their lifetime value, purchase frequency, specific purchases, and more.

Braze also supports purchases in multiple currencies. If a purchase is reported in a currency other than USD, it will be shown in the Braze dashboard in USD, based on the exchange rate at the date the purchase was reported.

To learn more, visit our dedicated purchase events article.

Sample implementation

Please note that the actual implementation of purchase events will require some technical knowledge as it involves integrating the Braze SDK with your app. Your customer success manager will walk your team through this process as part of your onboarding, but the general steps are as follows:

  1. Integrate the Braze SDK: Before logging any events, you’ll need to integrate the Braze SDK into your app.
  2. Log the purchase event: After the SDK is integrated, you can log a purchase event whenever a user makes a purchase in your app. This is typically done in the function or method called when a purchase is completed.

Here’s an example of how to log a purchase event in an iOS app using Swift:

1
Appboy.sharedInstance()?.logPurchase("product_name", inCurrency: "USD", atPrice: NSDecimalNumber(string: "1.99"), withQuantity: 1)

In this example, “product_name” is the name of the product that was purchased, “USD” is the currency of the purchase, “1.99” is the price of the product, and 1 is the quantity purchased.

  1. View the purchase event in the Braze dashboard: After the purchase event is logged, you can view it in the Braze dashboard. You can use this data to analyze your revenue, segment your users, and more.

Remember, the exact implementation may vary depending on the platform (iOS, Android, Web) and the specific requirements of your app.

Custom events

Custom events are events that you define based on the specific actions you want to track within your app or site. Braze does not automatically track them—you must manually set up these events in your Braze SDK implementation. Custom events can be anything from a user completing a level in a game to a user updating their profile information.

Here’s an example of how to log a custom event in an iOS app using Swift:

1
Appboy.sharedInstance()?.logCustomEvent("completed_level")

In this example, “completed_level” is the name of the custom event that gets logged when a user completes a level in a game. That custom event is then recorded on their user profile in Braze, which you can use to trigger campaigns and personalize messaging.

To learn more, visit our dedicated custom events article.

Sample implementation

Similar to purchase events, custom events require additional setup. Here’s a general process for implementing custom events in Braze:

  1. Integrate the Braze SDK: Before you can log any events, you’ll need to integrate the Braze SDK into your app.
  2. Define your custom event: Decide what action in your app you want to track as a custom event. This could be anything that’s significant to your app, such as a user completing a level in a game, a user updating their profile, or a user making a specific type of purchase.
  3. Log the custom event: After you’ve defined your custom event, you can log it in your app’s code. This is typically done in the function or method that gets called when the action occurs.

Here’s an example of how to log a custom event in an iOS app using Swift:

1
Appboy.sharedInstance()?.logCustomEvent("updated_profile")

In this example, “updated_profile” is the name of the custom event that gets logged when a user updates their profile.

  1. Add properties to your custom event (optional): If you want to capture additional details about the custom event, you can add properties to it. This is done by passing a dictionary of properties when you log the event.

Here’s an example of how to log a custom event with properties in an iOS app using Swift:

1
2
let properties: [AnyHashable: Any] = ["Property Name": "Property Value"]
Appboy.sharedInstance()?.logCustomEvent("updated_profile", withProperties: properties)

In this example, the custom event has a property called “Property Name” with a value of “Property Value”.

  1. View the custom event in the Braze dashboard: After the custom event is logged, you can view it in the Braze dashboard. You can use this data to analyze user behavior, segment your users, and more.
HOW HELPFUL WAS THIS PAGE?
New Stuff!