Comments (9)
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 actionUrl=@grouper;actionUrl=@reef
incorrectly result in no data, which can be seen on demo.matomo.cloud:
has no data (actionUrl=@grouper;actionUrl=@reef
): https://demo.matomo.cloud/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday#?idSite=1&period=day&date=yesterday&category=General_Visitors&subcategory=Live_VisitorLog&segment=actionUrl%3D%40grouper%3BactionUrl%3D%40reef
has data (actionUrl=@grouper
): https://demo.matomo.cloud/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday#?idSite=1&period=day&date=yesterday&category=General_Visitors&subcategory=Live_VisitorLog&segment=actionUrl%3D%40grouper
has data (actionUrl=@reef
): https://demo.matomo.cloud/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday#?idSite=1&period=day&date=yesterday&category=General_Visitors&subcategory=Live_VisitorLog&segment=actionUrl%3D%40reef
The segment SQL that is generated for such a segment is:
SELECT log_visit.* FROM matomo_log_visit AS log_visit LEFT JOIN matomo_log_link_visit_action AS log_link_visit_action ON log_link_visit_action.idvisit = log_visit.idvisit LEFT JOIN matomo_log_action AS log_action_segment_log_link_visit_actionidaction_url ON log_link_visit_action.idaction_url = log_action_segment_log_link_visit_actionidaction_url.idaction WHERE ( log_visit.idsite in (?) AND log_visit.visit_last_action_time >= ? ) AND (( (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '1') OR (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '3') OR (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '2') OR (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '10')) AND ( (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '1') OR (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '3') OR (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '2') OR (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '10'))) GROUP BY log_visit.idvisit ORDER BY log_visit.idsite DESC, log_visit.visit_last_action_time DESC LIMIT 0, 12
The problem here appears to be that the segment selects from log_link_visit_action
instead of log_visit
.
from matomo.
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 π
from matomo.
Hi @oraclerob, can you check whether this segment matches anything in the Visits Log (not in a normal report)?
from matomo.
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.
from matomo.
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
actionUrl=@grouper;actionUrl=@reef
incorrectly result in no data, which can be seen on demo.matomo.cloud:has no data (
actionUrl=@grouper;actionUrl=@reef
): https://demo.matomo.cloud/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday#?idSite=1&period=day&date=yesterday&category=General_Visitors&subcategory=Live_VisitorLog&segment=actionUrl%3D%40grouper%3BactionUrl%3D%40reefhas data (
actionUrl=@grouper
): https://demo.matomo.cloud/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday#?idSite=1&period=day&date=yesterday&category=General_Visitors&subcategory=Live_VisitorLog&segment=actionUrl%3D%40grouperhas data (
actionUrl=@reef
): https://demo.matomo.cloud/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday#?idSite=1&period=day&date=yesterday&category=General_Visitors&subcategory=Live_VisitorLog&segment=actionUrl%3D%40reefThe segment SQL that is generated for such a segment is:
SELECT * FROM log_link_visit_action AS log_link_visit_action LEFT JOIN log_action AS log_action_segment_log_link_visit_actionidaction_url ON log_link_visit_action.idaction_url = log_action_segment_log_link_visit_actionidaction_url.idaction WHERE ( log_link_visit_action.idvisit = ? ) AND (( (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '1') OR (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '3') OR (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '2') OR (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '10')) AND ( (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '1') OR (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '3') OR (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '2') OR (log_action_segment_log_link_visit_actionidaction_url.name LIKE ? AND log_action_segment_log_link_visit_actionidaction_url.type = '10')))
The problem here appears to be that the segment selects from
log_link_visit_action
instead oflog_visit
.
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.
from matomo.
@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.
from matomo.
@oraclerob just to confirm, in the example listed above, are you looking for visits with an action URL that has both contains segments (eg, http://mysite.com/booking-confirmation/winter-down-south/
) or visits that have one action where the URL contains booking-confirmation
and one action where the URL contains booking-confirmation
?
from matomo.
@oraclerob just to confirm, in the example listed above, are you looking for visits with an action URL that has both contains segments (eg,
http://mysite.com/booking-confirmation/winter-down-south/
) or visits that have one action where the URL containsbooking-confirmation
and one action where the URL containsbooking-confirmation
?
@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.
from matomo.
@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 Referrer Name/Campaign Name
to match the winter-down-south
campaign, for example? Then you could combine that with Action URL contains booking-confirmation
. If you have a goal for booking confirmation, you could also use Visit converted a specific goal ID/Name
instead of Action URL contains booking confirmation
. Would either of these options work for you?
from matomo.
Related Issues (20)
- Results problem in βOthers HOT 1
- Date Comparison: require "Apply" button as the only way to close the modal HOT 2
- Ability to Segment visits based on a visitor's number of visits
- Feature request: display message on sign-in screen
- More ways to delete Raw data and Reports data
- [Bug] When adding a user, the confirm button has an error message inside it HOT 1
- Feature Request: Be able to install matomo to a a database that requires SSL HOT 2
- [Bug] Can't select "Previous period" when comparing a range
- [Bug] When comparing a Date to a "Custom" range, preset the cursor on "Start date" to save time and a click HOT 1
- [Bug] Unused methods in `chai-extras.js` related to UI tests
- [Bug] Matomo Database - waiting for table metadata lock
- [Bug] Negative feedback button does not work within the UI
- [Bug] iconv() notice in PHP GeoIp2 LocationProvider during fuzzy matching
- Sum up all goals to a total percentage value
- An ability to change date-time interval in graphs
- Database old archive data strong increased HOT 1
- Make the ecommerce abandoned cart report more visible
- Create a default dashboard configuration for ecommerce websites HOT 1
- [Bug] Event values with a comma
- New Options for filtering Date
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matomo.