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.
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).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.
We therefore obtain an analysis respecting these conditions. You will be able to add additional properties or delete some, according to your wishes.