Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Referrers/Columns/Campaign.php')
-rw-r--r--plugins/Referrers/Columns/Campaign.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/Referrers/Columns/Campaign.php b/plugins/Referrers/Columns/Campaign.php
index 158876a7ef..30c7cc609a 100644
--- a/plugins/Referrers/Columns/Campaign.php
+++ b/plugins/Referrers/Columns/Campaign.php
@@ -48,8 +48,12 @@ class Campaign extends Base
$information = $this->getReferrerInformationFromRequest($request, $visitor);
+ // we force a new visit if the referrer is a campaign and it's different than the currently recorded referrer.
+ // if the current referrer is 'direct entry', however, we assume the referrer information was sent in a later request, and
+ // we just update the existing referrer information instead of creating a visit.
if ($information['referer_type'] == Common::REFERRER_TYPE_CAMPAIGN
&& $this->isReferrerInformationNew($visitor, $information)
+ && !$this->isCurrentReferrerDirectEntry($visitor)
) {
Common::printDebug("Existing visit detected, but creating new visit because campaign information is different than last action.");