Contextual Filters

Refinement filters

The first contextual filter introduced to our application is Visited Url, which can be used in conjunction with the main event - Clicked Element.


The contextual filter is a filter that can only be used in combination with a primary one. It allows you to add additional conditions to the actions of the users.

What is the difference between the main event filter and contextual Visited URL?

To better understand the distinction, we will examine both configurations.

When you have a configuration like this one:


Configuration with 2 main event filters: Visited URL and Clicked Element

visited URL contains

Clicked Element (CSS) is: #button-1092-btnInnerEl

This means that your segment will be matched with all users who have visited the page at least once and clicked the element, regardless of which page they were on at the time of the button click.


Using 2 main event filters

In the example below: two users have interacted with the HTML element and visited the page.


The list of users who have visited the page and interacted with the element.

This is not the same as having the following configuration:


Configuration with one main event filter and contextual one

Clicked Element (CSS) is: #button-1092-btnInnerEl

{when} visited URL contains:

The last guaranteed that users who pressed that button were on that specific page at the time. Only users who interacted with the element while on the page will be included in your segment.


Using one main event and the contextual filter

The first configuration includes two users, as shown in the examples, whereas the second includes only one user who clicked the button while on the page.


The list of users who have interacted with the element on a specific page

How to configure

Check Visited URL for details on how to use each of the four supported options: matching, contains, starts with, and ends with.

The contextual filter can be used also in combination with the main event Rage Click. For more about this filter, read here.

What’s Next

How to use and configure the main event filters: Clicked Element and Visited URL