-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a Segment with AND clause returns no data #22235
Comments
Hi @oraclerob, can you check whether this segment matches anything in the Visits Log (not in a normal report)? |
I did. I created the same segment with an "OR" condition and it returns both visits in the report correctly. As soon as I make it "AND" it returns no data. Any other event or visitor metric also does the same. |
Hi @oraclerob, I see, I can reproduce this, it's definitely a bug. It's also a problem with the core product and not Matomo for WordPress, so I'm going to transfer the issue to their repository. Thanks for taking the time to report this. Details for the core team: Bug: segments like has no data ( has data ( has data ( The segment SQL that is generated for such a segment is:
|
Hi @diosmosis thanks for your prompt answer - are you able to show me which file/line to make this fix? I'm surprised this is in core as well as I would think many users would want AND conditions on segments. I need this functionality urgently for a campaign and would rather not wait and make a temporary fix until the patch is out. Many thanks. |
@oraclerob Apologies, but this looks like a complicated bug to fix. Regarding the bug itself, it's not that AND conditions don't work, it's that they don't work when two or more action dimensions are used together in a segment. (I understand though that that clarification doesn't help you.) If I can think of a solution before the core team picks it up I'll notify you, but in either case I don't think a solution will come quickly. |
@oraclerob just to confirm, in the example listed above, are you looking for visits with an action URL that has both contains segments (eg, |
@diosmosis - we are looking at visits that include 2 or more actionsURLs or Goals. Imagine we have a campaign landing page with a URI of winter-down-south and if that user clicks on a couple more pages then makes a booking with the URI - booking-confirmation - that means that the campaign got us the booking. I hope that makes sense? That's what we want to track. According to the "Goal" setup - I can group URIs to do this, but you cannot? There is only 1 URI you can enter in the Goal setup, therefore I have gone down this path to track the campaign. |
@oraclerob thanks for the clarification (to core team: this means pageUrl=@abc;pageUrl=@def being visit that has page URL containing 'abc' and also a page URL containing 'def'). @oraclerob based on your specific needs, there might be alternative segments you can use to achieve the same result. Would you be able to use |
Thanks @diosmosis - I thought I had already tested a combination with different events, but obviously not. By using an AND condition with actionURL and Goal it is now working as expected. Brilliant I have a workaround 👍 |
It doesn't matter what the segment criteria is, putting an AND condition will always return no rows. The OR condition does work.
Wordpress plugin version is 5.0.6
The text was updated successfully, but these errors were encountered: