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
Updating visit dimensions might not work correctly in some cases #19316
Comments
@sgiehl be great to add a comment to what this means for the users from their perspective? When and what data be impacted there for them? I understand also from your other comment that if initially the referrer was detected as direct, and then the referrer changes, then the referrer type is detected correctly but the URL stays empty? Is this only an issue when |
@sgiehl Thanks for creating the issue. Regarding this part:
Could you maybe list the steps to reproduce the issue and clarify what the problem is? Thanks! |
If I remember correctly that happens when a referrer is updated within the same visits. So to reproduce I would assume it something like
|
@sgiehl Q: would it be possible to maybe fix this particular bug in a quicker way without having to do a broader rework? |
It might. But we really should invest more time to get rid of our technical depts instead of introducing new onces with doing quick fixes only. If we try to save the time now, we will need to invest even more when we need to adjust the attribution later again. |
Matomo uses so called Dimension classes to determine which database fields needs to be set/updated in the log tables.
Each Dimension class can contain several hook methods that are called depending on the visit/action currently handled.
When such a hook is triggered, we currently iterate over all dimensions and may update the dimensions value directly.
This may lead to unexpected behavior when other dimensions, might try to work with the value of a dimension, as it depends on the order of the dimensions if the value might be the initial one, or if it might be updated already.
Currently this makes problems when updating the refererr. This happens when the initial referrer was detected as DIRECT and an onoging action send another referrer. As the referrer_type dimension is updated, before the referrer_url property, the url stays empty.
See discussion in #19250.
We need to rework the dimension / property handling of visits in Matomo 5 and decide if we want to introduce some sort of dependency, that ensures properties that depend on others are updated later. And methods like
getPreviousVisitColumn
andgetVisitorColumn
show be renamed/refactored so it's clear weather they return the initial or updated property value or even the property of a previous visit.follow-up to #19250
The text was updated successfully, but these errors were encountered: