Event Trigger listening in BlueConic allows you to pick up on certain changes and throw an event when they happen. Such events can then be caught by things waiting for that event to be thrown, such as Dialogues.
Adding a new Event Trigger listener
- Click Listeners in the Navigation bar.
- Click Add listener.
- A pop-up window appears. Check the Show all box. Enter “event trigger” in the Search bar. Select Event Trigger listener.
- The Event Trigger listener page opens. You can expand or collapse metadata fields (favorite, labels, and description) by clicking the gray chevron at the top of the page.
Configuring an Event Trigger Listener in BlueConic
- Optional: Enter the channels or pages where you want the listener to be active.
- Click Add event and rule to add a new event and the rule that decides when to throw that event. These are the options:
-
Content rule triggers an event based on the content of the page or based on a JavaScript variable.
- Click define event. A pop-up opens. Select an existing event or enter a new event name, and select Create new event. Click OK to close the pop-up.
- Click define content area. A pop-up opens. Select the source that should be compared; either a Content area defined by a selector, a JavaScript variable on the page or Custom JavaScript.
- Click contains to toggle between "contains" and "exactly matches".
- Click define words. A pop-up opens. Define the text or specific words that should be matched. Click OK to close the pop-up.
- Click no delay to enter the number of milliseconds that should pass between the click and the event being thrown. Leave empty for no delay.
- Click define event. A pop-up opens. Select an existing event or enter a new event name, and select Create new event. Click OK to close the pop-up.
-
Click rule triggers an event based on the click behavior of the visitor.
- Click define event. A pop-up opens. Select an existing event or enter a new event name and select Create new event. Click OK to close the pop-up.
- Click HTML. A pop-up opens. Select the source that should be compared; either a Content area defined by a selector, a JavaScript variable on the page or Custom JavaScript.
- Click contains to toggle between "contains" and "exactly matches".
- Click any text. A pop-up opens. Define the text or specific words that should be matched. Click OK to close the pop-up.
- Click define click area to define the area where the visitor will click with a jQuery selector or with the Visual picker.
- Click no delay to enter the number of milliseconds that should pass between the click and the event being thrown. Leave empty for no delay.
- Click define event. A pop-up opens. Select an existing event or enter a new event name and select Create new event. Click OK to close the pop-up.
-
Content rule triggers an event based on the content of the page or based on a JavaScript variable.
Privacy management
Listeners can be added to Objectives, allowing for privacy management of the information that is being picked up. The listener will only update a profile if the visitor consented to at least one of the objectives that it is linked to.
Using events
Once you have added events and have configured when they will be thrown, you will want to take action based on them. There are two ways of using events: in a BlueConic dialogue or in JavaScript.
Using events in a dialogue
- Open your BlueConic dialogue.
- Click the When tab.
- Click Add rule and select Show on event.
- Scroll through the list of events and activate the checkbox for your event.
- Click Save.
The dialogue will now only fire when the event is thrown by the event listener.
Using events in JavaScript
The BlueConic front-end JavaScript API provides the function event.subscribe() to subscribe to your event. See the API documentation for a full code example.