In this article, we'll show you how easy it is to create global trackable events and use them for Display Rules targeting.
Creating Events #
In your site's "Settings" section, you can find the tab called "Event Tracking". Click it and press the "Add Goal" button to create one of three event types:
Page Visit Event #
This event type is based on the visit of your site's page URL. Specify the name, event type and choose the matching condition along with the needed URL. Once everything set up, press the "Create Event" button.
Now every visitor of your site, who browse the specified page, will get this "Goal" (URL visit) saved. You'll be able to use it further for targeting widgets/offers via Display Rules.
Element Click Event #
This event type is based on the click on the element of your page (button, link, text, image, etc.) that has the specified CSS selector. Just choose the name, event type, and type in the needed CSS selector:
You can use CSS classes, IDs, and more complex selectors if needed:
Example of using CSS classes:
Example of using CSS IDs:
Once everything set up, press the "Create Event" button.
Now every visitor of your site, who clicks the specified selector, will get this "Goal" (CSS selector click) saved. You'll be able to use it further for targeting widgets/offers via Display Rules.
Custom Events #
Now every visitor who'll get this JS (from the example above, without "if" part) executed while browsing your site:
will get this "Goal" (JS tracking) saved. You'll be able to use it further for targeting widgets/offers via Display Rules.
A) When widget appears
You can set up this JS code to execute when widget appears, in its Display Rules > Tracking Pixel Code:
B) On-click to widget's button
Event tracking code pasted this way will trigger on button click.
You can also set up your site to trigger this JS with built-in or 3-rd party tools:
Just use the relevant JS code and the event will be saved for the site visitor as completed.
Using Events for Display Rules #
Once events are ready, you can set up your widget(s) to show only if the specified event is completed. Go to "Display Rules" > "Show only if" section:
and choose the relevant behavior-based condition called "Trackable event":
Pick the needed event via the dropdown list and specify the matching condition "was/wasn't triggered":
That's it! You now have globally tracking events that you can use for segmenting your forms/widgets for the right audience.