Events

An event is a defined and described model of interaction that can occur on your site. Events are recorded by a tracker, and can be used to define Segments (groups of users who have all experienced the same event(s)) and Campaigns.

A few examples will help you understand what you might define as an event.

_images/event-list.png
  • Clicked/Touched Add To Cart Button — Clicked/touched “Add To Cart” button on a product’s page
  • Searched for Ninja — Searched for any products that are related to ninjas
  • Page URL contains “ninja” — Whenever a page URL contains “ninja” word, this product/page is ninja-related
  • Filter for less than $20 — A customer searches for products with ninja with price lower than $20
  • Products on checkout contain ninja products — There is ninja-related products among items the customer is buying
  • Placed the order — The customer has placed the order
  • Number of cart items >= 1 — Customer has actually added something to the cart
  • Purchase with total of over $20 happened — A customer has purchased items with order total over $20
  • Purchase with total of less than or equal $20 — A customer has purchased items with order total less than or equal to $20

An event might be:

  • a visitor loads a particular page, defined by title or URL
  • a visitor views a particular view in an app, defined by title or view controller
  • a visitor interacts a particular way with a particular element (clicking/touching a button, using a search box)
  • a particular element appears or changes on a page

Any tracker event can be the basis for a event definition, including custom events.

Event Definition

Events are associated with a specific tracker, so to create a new event or review existing events, go to the page for a specific tracker.

Fill in the Name and Description with something that makes sense for you.

Note

Events names must be unique within a tracker. We suggest you make them unique within an organization, unless you are tracking equivalent events across multiple trackers.

If the event represents a conversion, check the Conversion box.

Select a Collection and Filter

When recorded, Tracker Events are organized into collections. A collection is all events of a particular type. To define a specific event in the app:

  • select a collection
  • apply filters

For example, to define the event User Clicks on “Add on to Cart” Button, you would:

  • Select the Click on event type
  • Filter for timeseries.element properties that identify the correct button on your site.

In our Demo Store, the Add to Cart button has class attributes single_add_to_cart_button and button, so filtering for click events on that button in particular looks like:

_images/add-to-cart-filter.png

Properties

Events have Properties attached to them, which are key-value pairs that record information about the event, such as:

● URL Path
● Alt Attribute
● Referrer Path

and many more.

Intempt does have strict static schema for events. Properties are allowed to be added dynamically via website interactions. Once added they are available to be selected. Commonly occuring web properties are provided out of the box, without looking at your web schema, dynamically, for ease of use purposes.

Use properties to further segment your visitors. Some generic properties are available for almost any event type:

● The Href property refers to the full URL including the protocol: https://www.example.com/landing_page/test
● The Origin property only refers to the domain including the protocol: https://www.example.com
● The Host property only refers to the domain: www.example.com
● The Path property only refers to the path following the domain: /landing_page/test
The Query property only refers to the queries attached to a URL: ?q=shoes&size=12

Sample Event Setup

This sample setup shows a page view event with several properties attached to it:

_images/event-props2.png

Select An Event Type

First define an event type, in this case Page View.

Add A Property

Use property operators to exclude or include certain property values.

Suitable operators such as

● contains / does not contain
● defined / not defined
● equals / does not equal
● true / false

for a property are automatically displayed.

Use asterisks * as wild card expressions for almost any property value.

The right property value data type is automatically selected, you don’t need to change it.

Concatenate Properties

Add as many properties to an event as you like simply by clicking ‘Add Filter’. Create more sophisticated setups by nesting properties with the ‘+’ button.

Properties can be concatenated with boolean operators AND or OR. Change any (nested) property concatenator to AND or OR by just clicking on it.

Trigger An Event

This sample event is triggered, when

  1. A user is browsing a web page containing ‘/test’ in its URL path AND
  2. The referrer is Google AND
    1. The page URL path contains the term ‘grass’ OR
    2. The page URL path contains the term ‘hotel’

Please note the nested page URL path properties a and b.

In the example above visitors browsing these web pages:

● www.example.com/test/grass
● www.example.com/test/grass/further_infos
● www.example.com/test/hotel
● www.example.com/test/hotel/further_infos
● www.example.com/test/hotel/home

will all trigger the event.

Visitors browsing these web pages

● www.example.com/test2
● www.example.com/test2/grass
● www.example.com/test/mountain
● www.example.com/test/grass?q=home
● www.example.com/test/hotel/home?q=home

will not trigger the event.

Action Types

When defining events, you can choose from these types:

_images/event-types-select.png
  • Page view — A visitor has viewed a specific URL-defined page.
  • Click — A visitor has clicked on any element.
  • Form submit — A visitor has submitted a form.
  • Input change — A visitor has changed the value of an editable element, such as a text entry, check box, or number spinner.
  • Page element exists — A visitor views a page on which a defined element is present.
  • Page element changed — The content of a defined element changes, usually through JavaScript.
  • Advanced — A custom-defined event that is logged using the JavaScript API.

Visit

The visit event is triggered when a visitor starts a session by browsing your website.

_images/event-props3.png

This sample event is triggered, when

  1. A user is browsing the website the tracker is installed on AND
  2. The referral website’s URL contains ‘https’, ‘example.com’, ‘/landing_page’ and ‘/test’

In the example above visitors coming from these web pages:

https://www.example.com/landing_page/test
https://blog.example.com/landing_page/test
https://www.example.com/landing_page/test/further_information
https://www.example.com/test/landing_page

will all trigger the event.

Visitors coming from these web pages:

http://www.example.com/landing_page/test
https://www.example2.com/landing_page/test
https://www.example.com/landing-page/test
https://www.example.com/landing_page

will not trigger the event.

Action Type Page View

The page view event is triggered when a visitor loads any page on your website.

_images/event-props4.png

This sample event is triggered, when

  1. A user is browsing a page containing ‘/test’ in its URL path AND
    1. The page path contains the term ‘grass’ OR
    2. The page path contains the term ‘hotel’ AND
  2. Page title does not contain the term ‘home’ AND
  3. Search query does not contain the term ‘home’

In the example above visitors browsing these web pages:

● www.example.com/test/grass
● www.example.com/test/grass/further_infos
● www.example.com/test/hotel
● www.example.com/test/hotel/further_infos
● www.example.com/test/hotel/home

will all trigger the event, if the page title does not contain the word ‘home’.

Visitors browsing these web pages

● www.example.com/test2
● www.example.com/test2/grass
● www.example.com/test/mountain
● www.example.com/test/grass?q=home
● www.example.com/test/hotel/home?q=home

will not trigger the event.

Action Type Click

The click event is triggered when a visitor clicks on an element such as a button.

_images/event-props5.png

If you filter click events they are usually attached to one element only. Use Classlist to retrieve the element’s class.

This sample event is triggered, when

  1. A user is browsing a page containing ‘/landing_page’ in its path AND
  2. The button ID contains ‘proceed’ AND
    1. The button’s class property contains either ‘button’
    2. OR ‘large’ AND
  3. The button’s text contains ‘Please proceed’

The HTML button element triggering this event could look like this:

<button type="button" ID="proceed" class="button large">Please proceed</button>

Please note the combination of button click and page URL path.

Action Type Input Change

The input change event is triggered when an input element on the web page is being changed.

_images/event-props6.png

Please note: If you filter input change events they are usually attached to one element only.

This sample event is triggered, when

  1. A user is browsing a page containing an input element with the ID ‘search’ AND
  2. The class ‘search-field’ AND
    1. The input value is ‘test’ OR
    2. ‘tset’

The HTML input element triggering this event could look like this:

<input type="search" id="search" class="search-field" placeholder="Search Here" value="" name="search">

Action Type Form Submit

The Form Submit event is triggered when a form on the web page is being submitted.

_images/event-props7.png

If you filter form submit events they are usually attached to one element only.

This sample event is triggered, when

  1. A user pushes a submit button AND
  2. A user is browsing a page containing a form with the ID ‘sign-in-form’ AND
  3. Has an input with the ID ‘username’ AND
    1. The input value is ‘test@example.com’ OR
    2. test2@example.com’ AND

The HTML form element triggering this event could look like this:

<form ID="sign-in-form" name="signinForm">
 <input ID="username">
 <input ID="password">
 <input id="sign-in-button" type="submit" value="Login" >
</form>

Action Type Page Element Exists

The Page Element Exists type captures existence (appearance or disappearance) of an element on a page. Once an element appears (or a page with it is first opened), its state is captured and sent as an event, and until element disappears (or the respective page has been left).

Any changes to element after it has appeared on the page are not tracked via this event type.

Note

Page element exists event type is, unlike view page and interaction types, a non-retroactive event type. This means, that until you have defined an event of Page Element type, no data capturing is being done.

This event type captures the appearance of the first element, picked by specified selector and disappearance of the last one, left on the page. So, if your logic adds consequently 10 elements, only once the first one appears the event would be triggered. Similarly, if you have 10 elements on the page that you logic is removing, only once the last one is removed the disappearance event would be triggered.

_images/event-props8-2.png

This sample event is triggered, when

  1. A user loads a web page AND
  2. An element exists on this page with path ‘#main > p’ AND
  3. The element’s class list contains ‘woocommerce-info’

The HTML of this example setup could look like this:

<div id="main">
  <p class="centered woocommerce-info uppercase">Information:</p>
<div>

Note

For the most reliable performance, the element path should be defined with an ID, or, at the very least, x-path selectors should be avoided as they are easily breakable by even minor site structure changes.

Action Type Page Element Changed

For Page Element Changed type, once any property of the element is changed (which can be text, style, attributes and so on), its new state is captured and sent as an event.

This event is not triggered for the first appearance of an element - only once it has been changed after appearance this event would be received.

To track page element changes, you should specify CSS selector for this element. This CSS selector can be in any form you might choose: it could be a specific path to a specific element, or it can be a more generic class-based selector.

Warning

tracking too many page elements can affect performace of your pages. While very handy and convenient, try to restrict number of elements simultaneously tracked.

Notification

The Notification event is triggered when an Intempt notification is triggered. Please select ‘Type Advanced’ first to select this event.

_images/event-props9.png

This sample event is triggered, when

  1. A campaign with the name ‘console-announcements’ exists AND
  2. The campaign ID of this campaign is ‘18b865fa2f7011e7aac2e1636259ef10’ AND
  3. This campaign has control enabled AND
  4. Campaign message has been sent.

Product Changed

The Product Changed event is triggered when a product has been changed. Please select ‘Type Advanced’ first to select this event.

_images/event-props10.png

Change the existing JS tracking variables to track product change events, the Intempt tracker will create the context and persist them automatically:

window.intempt_product = 'my-product'; //defines the product for current page.

To reset the product, simply purge values from these variables (if your website is multi-page application this is done automatically upon page transition):

window.intempt_product = undefined; //resets the product for current page.

This sample event is triggered, when

  1. Product tracking has been set up on the website AND
  2. A page is loaded of a product with the name ‘envy’ AND
  3. The page URL contains the term ‘envy’

Category Changed

The Category Changed event is triggered when a category has been changed. Please select ‘Type Advanced’ first to select this event.

_images/event-props11.png

Change the existing JS tracking variables to track category change events, the Intempt tracker will create the context and persist them automatically:

To reset category and product, simply purge values from these variables (if your website is multi-page application this is done automatically upon page transition):

This sample event is triggered, when

  1. Category tracking has been set up on the website AND
  2. A page is loaded of a category with the name ‘tablets’ AND
  3. The page URL contains the term ‘tablets’

Event Analytics

Once you have set up an event, you’ll be able to start viewing activity data on it. Since a tracker records user behavior automatically when installed, you’ll be able to see event data that occured before your event was formally defined in the console.

From the Events page, click on any event to view the analytics page for that event.

At the top of the page, you’ll see the overview of activity over the last six months (or, since the tracker was installed).

_images/event-analytics-overview.png

The area graph (in green) shows the number of time the event happened. Overlaid on that, the point-and-line chart shows the conversion rate of that event (number of conversion events / number of people who experienced the event being analysed).

Note

  • Conversion calculations are based on the completion of an event defined by you and marked as a “conversion event.”
  • Depending on what (and how many) events are defined as “conversion events”, individual users might complete multiple conversions. This could lead to conversion rates above 100%.
  • An erratic conversion rate chart indicates a low correlation between the event being analysed and conversion.

You can toggle the overlaid chart to display other success metrics:

  • Average Order Value
  • Revenue per Visitor
  • Time on Site per Visit
  • Page Views per Visit

Order Value and Revenue are both calculated using the trackcharge event.

_images/event-toggle-metric.png

You can also toggle between viewing Identified or Anonymous visitors. The default view is All.

_images/event-toggle-visitors.png

Event Activity

Below the overview chart there is a collection of calendar-based charts.

_images/event-showertiles.png

Each of these charts is an activity over view of some individual visitor who did the event you are currently viewing, and also the event listed on the card.

While the overview chart gives you a holistic view of the activity, these calendar-charts give you a snapshot of how individual users move through your site. The calendar view shows you how often the visitor has come to your site. Click on Learn more, and you’ll see a list visitor’s event activity.

_images/event-journey.png

You can use the input at the top of this section to filter the displayed events.

_images/filtered-showertiles.png