Event Triggering

Note: Event triggering is an Enterprise-only feature. If you are interested in learning more about the Enterprise plan and Event triggering, please contact us. 

This feature is available for Enterprise plans only.

Event triggering means displaying an Appcues flow when an event occurs. By default, users will be evaluated for displaying flows on page load. Event triggering will show that flow immediately after the event occurs, rather than requiring a page load.

How to set up event triggering

Sending the event to Appcues

In order to set up a trigger, you need to send the event into Appcues (if you already do this, skip to the next section) client-side.

On any occurrence of an event you want to track, add the following block, substituting event name and event attributes below with appropriate data (note event attributes are optional):

Appcues.track('event name', { event attributes (optional) });

After the first instance of the event is sent into Appcues, it will show up on the events and properties page in your account, in the settings area. You can read more about event tracking in the Sending Events developer documentation.

Set up the event trigger

From the Flow Settings page, find the section labeled "Trigger". Select the option for triggering on an event, and choose the name of the event from the drop-down menu.

Flow display

When the user performs the action that triggers the event, Appcues will receive the track call with the event name (in this example, Clicked Purchase Button) and trigger the appropriate flow to show immediately. 💯

How to use event triggering with nested attributes

Note: Event triggering with custom attributes is in Enterprise-only beta. Please contact us if you'd like to have it enabled. 

In some cases, you may need multiple instances of the same event, but only want to take action or show a specific flow based on the attributes of that event. A good example of this might be tracking all Clicked Purchase Button events, but triggering a specific "Enterprise" flow when the plan purchased was labeled "Enterprise".

Here's how you might pass that event:

Appcues.track('Clicked Purchase Button', { planName: "Enterprise", buttonColor: "red" });

In the Trigger section of the Flow settings, here's how the event attributes section would look.

Note: you will need to type in the attribute name and value fields, no drop-down of previous data will be provided.

In the setup for attributes, you can use the normal operators, like `equals`, `contains`, `does not contain`, etc.

Event triggering and other targeting conditions

Event triggering plays well with other targeting conditions - so if you have an event set to trigger a flow, but only want it to happen on a specific page or pages, you can use the Display section of the flow targeting settings to limit it. You can also show it to only show the flow to specific users, using the Audience section.

Frequently asked questions

How can I pass my events in order to use event triggering?
For event triggering to work correctly, Appcues must receive notification the event occurred immediately. Client-side implementations (where the data gets sent from on the page itself, as opposed to a back-end server) must be used for event triggering. If you are using Segment, make sure the Segment/Appcues integration is enabled from within your Segment account and send over any of the events for triggers via analytics.track().
Remember all events for triggering must be sent client-side.

Can I target a flow to occur later based on these event attributes?
You can use events themselves for targeting (see this doc), but the nested attributes are for event triggering only. We do not store nested attributes (there can be a lot of them!) so they can't be used to targeting later at this time.

Can an event-triggered flow show while other Appcues flows are being displayed?
Event-triggered flows will take priority over any other flows set to show, even ones currently being displayed. Flows dismissed due to an Event-triggered flow will not show again (unless specifically set up to re-display in targeting conditions). 

Can I trigger the same flow based on different events?
Triggering a flow based on different events is not supported at this time. Use the clone feature to make a copy of the flow, and edit the Trigger section for each flow as needed.

Additional reading 📚