Skip to main content
Skip table of contents

What is the difference between a filter and a segment?

On both Data Query and Explorer, you have the ability to filter on your analysis results and / or apply a segment. These two operations, although similar at first sight, are different.

Filters

A filter will only display item results based on what you've filtered on.
For instance, if I make a filter on the "Contact" page, only this page will be displayed in your table (for each event which populated this property).

Segments

The segment will display all the visits' results during which this item was loaded.
For instance, if I set up a segment on the "Contact" page, I will obtain all the pages (or any other data, depending on the analysis), which have been populated thanks to the events triggered by the visits and who also have populated this property with the value "Contact".

Practical case

Let's imagine a site that has received 3 visits over a given period, made by three different visitors: A, B and C. These three visitors have loaded four pages: Home, Product page, Contact and Career.

 

Home

Product_page

Contact

Career

Visitor A 

1 load

0 load

0 load

1 load

Visitor B

2 loads

2 loads

2 loads

0 load

Visitor C

3 loads

1 load

1 load

0 load

If we display the loads for all these pages via a Data Query template, we get the following results:

Pages

Loads

Home

6

Product_page

3

Contact

3

Career

1

We will now show the difference between a filter applied on the "Contact" page and a segment based on the "Contact" page.

Results of a filter on the "Contact" page:

Pages

Loads

Contact

3

Comment: This filter will only focus on the "Contact" page. The other pages have been removed.

Results of a segment on the "Contact" page:

Pages

Loads

Home

5

Product_page

3

Contact

3

Comment: This time, we get page loads for all pages loaded during visits where the "Contact" page has been loaded (visits B and C).

The event scope in a segment

In a segment, you can select the "Events" scope.

The segment will then operate on the property values, for each event. This amounts to applying a filter or several filters on the properties in question.
The interest of this segment is being to be able to easily find the filtering conditions within the same place, as well as to be able to save it or share it.

In the example below, we only want to keep the rows for which the properties are strictly equal to these values.

mceclip0.png

We therefore obtain an analysis respecting these conditions. You will be able to add additional properties or delete some, according to your wishes.

mceclip1.png

Example use case:

  • If a visit can contain multiple purchases, a visit-level segment based on a page or funnel step may include all purchases in that visit, not only the purchases that match your intended product criteria.

  • To align results with what a filter would show, define an event-level segment on the purchase event (for example, product.purchased) and include the product conditions there

Troubleshooting

If a segment or filter does not match your expectations, check these common causes:

  • You used a visit-level segment when you needed event-level logic. Visit-level segments include all events from qualifying visits.

  • Your segment condition is true on one event, but your metric counts another event. For example, a segment based on a page view can still include purchase events from the same visit.

  • You are analyzing entry page vs. page. Entry page properties have a visit-level meaning (the entry page remains constant for the whole visit). If you want to segment by where visits started, use entry page properties (for example, entry page level 1/2) rather than general page properties.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.