WordPress API Events for User Journey

Last updated 08/05/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.

Creating a Block Element

To create a block element, simply open your page and add an element.

Once complete, you can get the element ID by following these steps:

  • 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
  • In the Additional CSS Class(es) field, enter a new class name.
  • Publish the page.

Creating an API Event

Follow the steps on the API Events page to create your API Event.

Setting up the API Event

Step 1

In the left menu in WordPress Admin, click on Bread & Butter IO.

Step 1

Step 2

From the Advanced Settings tab, and scroll down to the Custom API Event Setup section.

Step 2

Step 3

  • n the Element Name/ID/Selector field, enter the name that you created when you set up the Additional CSS Class(es) (for the element in the WordPress page, as described in the Before you Start section).
  • Since it is a class, add a dot before the name, i.e., .bb-my-button1.

Step 3

Step 4

  • Enter the event code that you created when you set up the API event your Bread & Butter IO App, as described in the Creating an API Event section.
Step 4

Step 5

  • Click Save.

Next Steps

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