A user can visit multiple project_area values during the same visit.
For example:
user_group = Group A
Action 1 → Project A
Action 2 → Project B
Action 3 → Project A
When we create a segment:
user_group = "Group A"
AND
user_project_area = "Project A"
the report still includes actions from Project B.
Is this expected because one dimension has Visit scope and the other has Action scope?
How can we create a segment that includes only actions where user_project_area = Project A, while also filtering by the visit-level user_group = Group A?
I think the visit-level and action-level filters may be applied differently here. It would be worth checking whether Matomo supports combining them while restricting the report to Project A actions only.
Yes, this behavior is expected because the two custom dimensions are working at different scopes. A visit-scope dimension applies to the entire visit, while an action-scope dimension is evaluated for individual actions.
When you combine them in a segment, the user_group = "Group A" condition filters the visits, but the action-level condition does not necessarily remove other actions from the same visit.
To get only the actions where user_project_area = "Project A" while keeping the visit filter, you may need to use an action-level segment condition for the report or create a separate segment focused on the action dimension. Also check whether the report you are viewing supports action-level filtering, as some Matomo reports aggregate data differently.
It may also help to verify the segment behavior with a smaller date range and the User Flow/Actions reports to confirm which scope is being applied.
That makes sense. The difference between visit and action scope can definitely make segment results confusing at first. Testing with a smaller date range and checking the Actions report sounds like a practical way to confirm how the filters are being applied.
Outside of analytics, I also spend time working on gaming content and sharing helpful resources for players. One of the projects I maintain is a stardewvalleyapk.app/ guide covering gameplay tips and useful information.
Thanks for clarifying this. Checking the Actions report with a smaller date range should make it easier to confirm whether Project B actions are still being included. I’ll test the segment there first and compare the results.
Yes, this is expected behavior, and it comes down to how Matomo applies the two scopes. The visit-scope condition (user_group = Group A) selects whole visits, and once a visit is selected, the action-scope condition does not filter the other actions out of that visit. So Action 2 (Project B) rides along inside every visit that matches the visit condition, exactly as you are seeing.
If user_group is effectively constant for the whole visit, the cleanest workaround is to record it as an action-scope dimension too. Nothing stops you from setting the same value on every action, even if it never changes mid-visit. Then build the segment from the two action-scope dimensions (user_group = Group A AND user_project_area = Project A). Action-scope segments are evaluated at the action level, so only the actions matching both conditions appear.
One thing to double check: the action-scope dimension values must be set before the tracking request for each action fires, otherwise actions tracked before the value is set will have an empty value and drop out of the segment unexpectedly.