WordPress API Events for User Journey

Last updated 05/24/2022

Create custom API events for specific actions on your website, and then add these events to your site’s user journey, so you can see how users progress through your site. You can also hook up these events to Integrations and Rules, to trigger actions in Mailchimp, Slack, Zapier, and more.

This guide covers creating API Events, setting them up in Bread & Butter, and adding them to your User Journey.

Step 1

Go to Bread & Butter IO on the left side menu in WordPress to begin the Setup process.

Step 1

Step 2

Click on the Advanced Settings tab, and scroll down to the Custom API Event Setup section

Step 2

Step 3

The get the value to enter in Element Name/ID/Selector, first go to the page editor for the page that has the element you want to trigger the custom API Event.


Step 4

  • Click on the Gear icon at the top right.
  • Click on the element on the page.
  • In the right pane, click Block
  • Then at the bottom, click Advanced
Step 4

Step 5

  • In the Additional CSS Class(es) field, enter a new class name (eg: bb-my-button1, or anything you want).
  • Publish the page.
Step 5

Step 6

Return to WordPress, and enter the name you put into the Additional CSS Class(es) into the Element Name/ID/Selector field. Since it is a class, add a dot before (eg: .bb-my-button1).

Note: You can also add the element ID for any other element on your site

Step 6

Step 7

  • For event code, enter any unique name or string, but with no spaces.
  • If you have already created a Custom API Event in Bread & Butter, enter the Event Code here. If you have not, we'll create it in Step 9.
Step 7

Step 8

  • Click Save.
  • Repeat for any additional Events.

Step 9

Create your Custom API Event in Bread & Butter IO.


Step 10

Add your Custom API Event to your User Journey in Bread & Butter IO.


Step 11

(Optional) Hook up your Custom API Event to an Integration & Rule in Bread & Butter IO.