Logging Purchases for Web

Record in-app purchases so that you can track your revenue over time and across revenue sources, as well as segment your users by their lifetime value.

Braze supports purchases in multiple currencies. Purchases that you report in a currency other than USD will be shown in the dashboard in USD based on the exchange rate at the date they were reported.

Before implementation, be sure to review examples of the segmentation options afforded by custom events vs. custom attributes vs. purchase events in our Best Practices section.

To use this feature, add this method call after a successful purchase in your app:

appboy.logPurchase(productId, price, "USD", quantity);

See the JSdocs for more information. Quantity must be less than or equal to 100.

Adding Properties

You can add metadata about purchases by passing an object of key-value pairs with your purchase information. Keys are string objects and values can be string, numeric, boolean, or Date objects.

appboy.logPurchase(productId, price, "USD", quantity, {key: "value"});

See the Jsdocs for more information.


You can also use our REST API to record purchases. Refer to the User API documentation for details.

New Stuff!