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
create new visit on different campaign info or different referrer website #6847
Conversation
…paign/website referrer information changes between actions. Includes new tracker hook shouldForceNewVisit that dimensions can use to force a new visit during tracking. Also includes light refactoring to referrer dimensions. Testless.
…ferrer info present in last action. Also add integration + system tests for new behavior.
; if set to 1, actions that contain different campaign information from the last action in the current visit will | ||
; be treated as the start of a new visit. This will include situations when campaign information was absent before, | ||
; but is present now (or vice versa). | ||
tracker_create_new_visit_when_campaign_changes = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont need to prefix with tracker_
since it's [Tracker] section
Feedback inline, nice change |
@@ -550,6 +542,23 @@ private function triggerHookOnDimensions($dimensions, $hook, $visitor, $action, | |||
return $valuesToUpdate; | |||
} | |||
|
|||
private function triggerPredicateHookOnDimensions($dimensions, $hook, Visitor $visitor, Action $action = null, $returnFirstTrue = true) | |||
{ | |||
$result = $returnFirstTrue ? false : array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we maybe remove $returnFirstTrue
feature, it's not used and makes it bit hard to understand
…ve shouldForceNewVisit to VisitDimension and simplify triggerPredicateHookOnDimensions.
Create new visit on different campaign info or different referrer website (includes minor refactoring to Referrer dimensions + 2 new INI config options).
Added FAQ to document this feature: https://piwik.org/faq/how-to/faq_19616/ |
Will fix issue #2624.