Triggerbee Plugin
The Triggerbee plugin forwards Sesamy authentication, paywall, and purchase events to Triggerbee for on-site personalization and conversion tracking.
Overview
This plugin listens for Sesamy events on the page and calls triggerbee.event() with appropriately shaped payloads. It identifies the user on login and logs goals for paywall interactions and purchases.
Requirements
You must load the Triggerbee tracker script on the page so window.triggerbee.event becomes available. Until it does, the plugin queues any Sesamy events that fire and flushes the queue once the tracker is ready (either when window.triggerbee.event is defined or when Triggerbee dispatches afterTriggerbeeReady), so events fired early are buffered rather than dropped.
Enabling the plugin
The plugin can be enabled in two ways.
Per-publisher (server-side config)
Add it to the vendor's configured scripts array. Once enabled, every bundle for that vendor includes the plugin automatically.
Per-page (URL query parameter)
Append ?plugins=triggerbee to the bundle URL. This requires no server-side change — useful for testing or for publishers who only want it on specific pages.
<script
type="module"
src="https://scripts.sesamy.com/s/YOUR_VENDOR_ID/bundle/stable?plugins=triggerbee"
></script>Multiple plugins can be combined with commas:
<script
type="module"
src="https://scripts.sesamy.com/s/YOUR_VENDOR_ID/bundle/stable?plugins=triggerbee,amplitude"
></script>Plugins listed in both server-side config and the query string load only once.
Events forwarded
| Sesamy event | Triggerbee call |
|---|---|
sesamyJsAuthenticated | triggerbee.event({ type: 'goal', name: 'Logged in', data: { identity } }) |
sesamyJsLogout | triggerbee.event({ type: 'goal', name: 'Logged out' }) |
sesamyJsPurchase | triggerbee.event({ type: 'purchase', data: { revenue, currency, identity } }) |
sesamyPaywallAccessChecked | triggerbee.event({ type: 'goal', name: 'Paywall Access Checked', data }) |
sesamyPaywallProductSelected | triggerbee.event({ type: 'goal', name: 'Product Selected', data }) |
sesamyUnlocked | triggerbee.event({ type: 'goal', name: 'Content Unlocked', data }) |
The user identity object includes email and userId when available from the Sesamy session.