Last updated 05/10/2022
Before adding Custom API Events, make sure you have added the initialization script tag.
Custom API Events are used to define your website’s User Journey, as milestones are reached for each user on your website. You can create an API event when a user does an action you are interested in monitoring, such as unlocking pricing, starting a free trial or downloading a coupon, discount code, or a (content gated) white paper or eBook. In this way, you can see where users are in their progression through your website’s journey as a customer.
To add Custom API Events to any page you just need to follow these few steps:
First, create your Custom API Event under API Events in Bread & Butter. For steps on how to do this, check out our API Events page.
Make sure you take note of the event code when you create it, so you can use it below.
Identify the button or element that you want to trigger the Custom API Event.
Find the initialization script you have added to your webpage (see initialization script if you have not added it already)
In the initialization script, find the line:
Add the following line under
You can also add a custom event call to any scenario programmatically by adding this line:
More details on this are available on our Github.
Add authentication & API event tracking to your website/app with a script tag & configuration