Does AND clause apply to actions within the same session (visit) or the same hit?
“Visiting both in the same time” implies that AND clause refers to the same hit.
My intention was to create a segment based on visits that include URL1 pageview and then URL2 pageview.
Regarding OR clause, the condition “URL is URL1” OR “URL is URL2” will include
visits with URL1 pageview + visits with URL2 pageview.
I think (but i don’t know for sure) that filter in segments apply to hit not to session (visit).
A filter in segment test a single action and, in a single action, the URL can only take on one value (A or B, not both). So, if you test with AND clause, the filter can never be satisfied.
You used “AND” clause assuming that check was at the session level, is it? That is, if in the same session user visit page A and visit page B, than, the “AND” clause is true. But in my experience, segments filters doesn’t work that way. They test only single action and, as I mentioned above, in the single action URL can only take on one value A or B.
In Google Analytics it seems to me that a segment like the one you would like could be made using the “sequens segment” but in Matomo i don’t know how to do it.
I think this depends on the type of dimension you segment on…If the dimension is a visit dimension (eg. user ID, date of visit, returning user, etc.) or if it is an action dimension (event name, url, etc).
Maybe a solution could be to use 2 new custom visit dimensions (eg called URL1 and URL2), not set by default.
If the user hits the URL1, then put some static value in the URL1 visit dimension, and if he hits the URL2, put some static value (can be the same or not as the one for URL1) in URL2. Now you can create a filter with the AND clause on URL1 and URL2