Event Tracking

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: 

1.png

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.

2.png

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:

4.png

You can use CSS classes, IDs, and more complex selectors if needed: 

Example of using CSS classes: 

.my-css-class

Example of using CSS IDs: 

#my-css-id

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 #

This event type is based on the execution of custom JavaScript. Just specify the name and event type:  

3.png

JavaScript trigger name will copy the name you create for this event, as you can see in the screenshot above. Press the "Create Event" button once you specify the name.

Now every visitor who'll get this JS (from the example above, without "if" part) executed while browsing your site: 

Convertful.trigger('custom-event');

will get this "Goal" (JS tracking) saved. You'll be able to use it further for targeting widgets/offers via Display Rules

How to Run Needed JavaScript #

A) When widget appears

You can set up this JS code to execute when widget appears, in its Display Rules > Tracking Pixel Code:

5.png

B) On-click to widget's button

When editing your Convertful widget, press the button to open its Settings and follow up with the "On Submit Actions" link with the relevant action "Execute JavaScript":

7.png

8.png

Event tracking code pasted this way will trigger on button click. 

C) Manually

You can also set up your site to trigger this JS with built-in or 3-rd party tools: 

Convertful.trigger('custom-event');

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: 

6.png

and choose the relevant behavior-based condition called "Trackable event": 

9.png

Pick the needed event via the dropdown list and specify the matching condition "was/wasn't triggered": 

10.png

That's it! You now have globally tracking events that you can use for segmenting your forms/widgets for the right audience.