Bento WordPress Integration
This guide covers installing and configuring the Bento WordPress plugin, the events it tracks, and how to verify everything is working.
Overview
The Bento WordPress plugin tracks events from popular WordPress plugins, updates subscriber data, and records lifetime value (LTV) in your Bento account.
The plugin supports multiple popular WordPress platforms and plugins including:
- WooCommerce and WooCommerce Subscriptions
- LearnDash
- Easy Digital Downloads
- Elementor Forms
- WPForms
- Bricks Forms - Bricksbuilder Bento Guide
- Gravity Forms
- ThriveLeads
- SureCart
Configuration
Requirements
- Active Bento account with API keys
- Latest version of WordPress
- Any supported integration plugin
Installation Steps
Download the plugin from GitHub here as a zip.
You can also download the source zip from the latest release.
The plugin is not listed on WordPress.org.
In WordPress, go to Plugins > Add New > Upload Plugin and upload the zip file. Activate Bento Helper.
The plugin adds a Bento item to the WordPress admin menu.
If you have not already, generate your Bento API keys from your teams screen.
Open Bento in the WordPress admin menu and enter your Site Key, Publishable Key, and Secret Key. Copy and paste as you go.
Once you have entered your keys, click the Connect to Bento button to save your settings. On the settings page,
the same action is called Save & Validate Connection.
If the connection is successful, you should see a green success message and the rest of the settings will become visible.
You can come back and adjust the connection settings at any time.
If you would like to log user activity such as page views, turn on Enable Site Tracking.
This loads Bento.js on your WordPress site.
Debug Logging writes a debug stream to wp-content/debug.log. It is verbose, so use Purge Logs
when you are done. With debug logging on, the Test Event button sends a $test_event event to Bento so you can
confirm your keys work. Not recommended to leave on in production.
You can turn on Mail Logging, which is useful for debugging and testing when using Bento transactional emails.
This feature allows you to see what emails are being sent and provides insights if you have questions
about email interactions. However, it's not recommended to leave this feature on in production.
The emails will be visible under the Mail Logs menu item, and you can clear them anytime using the Clear Logs button.
Bento supports transactional emails. This is designed for low volume transactional sending. It is not designed for high volume/frequent bulk sending.
Turn on Enable Transactional Emails, then select a Bento Author as the From Email. After this, you are ready to send.
While this is on, every wp_mail() call goes through Bento, including mail from other plugins. Emails with
attachments fall back to WordPress mail.
Include Reply-To Header passes any Reply-To value from WordPress to Bento.
Transactional Override lets you send transactional emails to unsubscribed users.
Proceed with caution. If recipients label your messages as spam, your sending reputation is impacted.
Integration Status
The Bento WordPress plugin now supports displaying the status of integrations on the plugin settings page. When the WordPress plugin detects that a supported plugin is installed, a green tick will appear next to the plugin name. If the plugin is not installed or not supported, the plugin name will be displayed in gray.
Caching Configuration
Bento's script is personalized and dynamic, changing on every page load to power on-page personalization. When using caching plugins like WP Rocket or SuperCache, you must:
- Exclude the custom Bento.js script from caching
- Ensure dynamic content is properly handled
Event Tracking
WooCommerce Events
The following WooCommerce Events are triggered and sent to Bento.
| Event Name | Description |
|---|---|
$OrderPlaced | Triggered when an order is marked "completed". Updates person's LTV with order total |
$OrderRefunded | Triggered on full/partial refund. Deducts refunded amount from person's LTV |
$OrderCancelled | Triggered when order status changes to "cancelled" |
WooCommerce Subscriptions Events
| Event Name | Description |
|---|---|
$SubscriptionCreated | New subscription created at checkout (any status) |
$SubscriptionActive | Subscription becomes active (e.g., after trial) |
$SubscriptionCancelled | Subscription status changes to "cancelled" |
$SubscriptionExpired | Subscription reaches end of term |
$SubscriptionOnHold | Subscription status changes to "on-hold" |
$SubscriptionTrialEnded | Trial period ends |
$SubscriptionRenewed | Scheduled renewal payment runs |
Sure Cart
| Event Name | Description |
|---|---|
$CheckoutConfirmed | Triggered when a checkout is completed (paid). Contains all metadata from the checkout and user info. |
Easy Digital Downloads
| Event Name | Description |
|---|---|
$DownloadPurchased | Triggered when a payment is complete for a download. |
$DownloadDownloaded | Triggered when a download is downloaded by a user. |
$DownloadRefunded | Triggered when a download is refunded, either partially or full. |
LearnDash
LearnDash events use learndash_ names without a $ prefix.
| Event Name | Description |
|---|---|
learndash_course_completed | Triggered when a user completes a course. |
learndash_lesson_completed | Triggered when a user completes a lesson. |
learndash_topic_completed | Triggered when a user completes a topic. |
learndash_quiz_completed | Triggered when a user completes a quiz. |
learndash_essay_graded | Triggered when a user's essay has been graded. |
learndash_assignment_approved | Triggered when a user's assignment has been approved. |
learndash_assignment_new_comment | Triggered when a new comment is added to a user's assignment. |
learndash_user_enrolled_in_course | Triggered when a user enrolls in a course. |
learndash_user_enrolled_in_group | Triggered when a user is enrolled in a group. |
learndash_user_purchased_course | Triggered when a user purchases a course. |
learndash_user_purchased_group | Triggered when a user purchases a group. |
learndash_user_earned_new_certificate | Triggered when a user earns a new certificate. |
Elementor Forms
- Custom event names configurable per form. The default is
$subscribed.elementor - Set up through "Actions After Submit" in form settings by selecting
Bento
WPForms
- Events are named
$wpforms.{form-title}from the form title, unless you set a custom event name in the form settings - Automatic tracking for all form submissions
Bricks Forms
- Events follow format:
$bricks_submission.form_id_{form_id}.post_id_{post_id} - See the Bricks Builder guide
Gravity Forms
- Events follow format:
$GFormsSubmit:{form_title}-{form_id} - The first email field in the form is used as the subscriber email
ThriveLeads
- Events follow format:
$thrive.optin.{form_identifier} - Example:
$thrive.optin.fancy-optin-shortcode-form-v6n9w1
Event Testing
To verify events are being tracked correctly:
- Complete an action that should trigger an event
- Check the Bento dashboard for the event
- Verify all expected data is present
User history and LTV
Monitor and manage user data including:
- Purchase history
- Event timeline
- Subscription status
- Form submissions
Subscriber Management
The plugin does not sync WordPress users to Bento on its own. Subscribers are created by the events it sends:
- When an event comes from a logged-in WordPress user, the plugin adds their first name, last name, display name, login, user ID, roles, and email as fields.
- Form submissions and activity data can tag users for segmentation and targeted messaging.
- Tags can be used to build lists for campaigns aimed at specific audience segments.
Custom Events From PHP
Themes and other plugins can send their own events with Bento_Events_Controller::trigger_event(). The plugin uses the
same method for its form integrations. Pass a user ID, an event name, an email, and optional details and fields.
add_action( 'user_register', function ( $user_id ) {
if ( ! class_exists( 'Bento_Events_Controller' ) ) {
return;
}
$user = get_userdata( $user_id );
Bento_Events_Controller::trigger_event(
$user_id,
'$UserRegistered',
$user->user_email,
array( 'source' => 'wordpress' )
);
} );