You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
If a URL containing campaign parameters with different values is tracked when the Referrers and MarketingCampaignsReporting plugins are both enabled then multiple visits will be logged for the same visitor.
It looks like first plugins\MarketingCampaignsReporting\Tracker\RequestProcessor() chooses test3 as the campaign name and also sets it as the referrer name and the referrer type as a campaign.
Then plugins\Referrers\Columns\Campaign::shouldForceNewVisit() (via plugins\Referrers\Columns\Base::detectReferrerCampaignFromTrackerParams()) uses the _rcn URL parameter to detect bing as the referrer type. Since the values don’t match a new visit is forced.
This is more obvious when there are media elements on the page sending multiple media tracking requests, where 4+ new records are created in the log_visit table for the same idvisitor withing a few seconds.
See L3-187
Expected Behavior
Only one visit should be recorded.
Current Behavior
Multiple visits are recorded.
Possible Solution
MarketingCampaignsReporting and the Referrers plugin should prioritize the campaign / referrer URL parameters in the same way so that the referrer is seen as the same and no new visit is forced.
Steps to Reproduce (for Bugs)
Enable the Referrers plugin
Enable the MarketingCampaignsReporting plugin
On a tracked website visit a page with these URL parameters: https://exampledomain.org?utm_source=bing&utm_medium=sem&utm_campaign=&matchtype=b&utm_term=test1&utm_content=&utm_medium=ppc&utm_term=test2&utm_campaign=test3&utm_source=bing&urlref=https://se.search.yahoo.com/&_id=uuidabc123&_idn=1&_rcn=bing&_rck=test4&_refts=1638204380&_ref=https://se.search.yahoo.com/&send_image=%27
Check the log_visit table, there will be multiple visits for the same visitor id.
(optionally for more duplicate visits: Enable the MediaAnalytics plugin, add the MediaAnalytics tracking code, then visit a tracked page using the above URL parameters where the tracked page has a few autoplaying videos)
@bx80 We can't really prioritize the parameters the same way in core and in the plugin as they are using different config flags and classes.
A quick suggestions that comes to my mind when thinking about it would be to kind of move the CampaignDetection class from plugin to core and use it with DI in core only. That way we could replace the used class in the plugin to use other / additional detection.
If a URL containing campaign parameters with different values is tracked when the Referrers and MarketingCampaignsReporting plugins are both enabled then multiple visits will be logged for the same visitor.
For example:
https://exampledomain.org?utm_source=bing&utm_medium=sem&utm_campaign=&matchtype=b&utm_term=test1&utm_content=&utm_medium=ppc&utm_term=test2&utm_campaign=test3&utm_source=bing&urlref=https://se.search.yahoo.com/&_id=uuidabc123&_idn=1&_rcn=bing&_rck=test4&_refts=1638204380&_ref=https://se.search.yahoo.com/&send_image=%27
It looks like first
plugins\MarketingCampaignsReporting\Tracker\RequestProcessor()
choosestest3
as the campaign name and also sets it as the referrer name and the referrer type as a campaign.Then
plugins\Referrers\Columns\Campaign::shouldForceNewVisit() (via plugins\Referrers\Columns\Base::detectReferrerCampaignFromTrackerParams()
) uses the_rcn
URL parameter to detectbing
as the referrer type. Since the values don’t match a new visit is forced.This is more obvious when there are media elements on the page sending multiple media tracking requests, where 4+ new records are created in the
log_visit
table for the sameidvisitor
withing a few seconds.See L3-187
Expected Behavior
Only one visit should be recorded.
Current Behavior
Multiple visits are recorded.
Possible Solution
MarketingCampaignsReporting and the Referrers plugin should prioritize the campaign / referrer URL parameters in the same way so that the referrer is seen as the same and no new visit is forced.
Steps to Reproduce (for Bugs)
https://exampledomain.org?utm_source=bing&utm_medium=sem&utm_campaign=&matchtype=b&utm_term=test1&utm_content=&utm_medium=ppc&utm_term=test2&utm_campaign=test3&utm_source=bing&urlref=https://se.search.yahoo.com/&_id=uuidabc123&_idn=1&_rcn=bing&_rck=test4&_refts=1638204380&_ref=https://se.search.yahoo.com/&send_image=%27
(optionally for more duplicate visits: Enable the MediaAnalytics plugin, add the MediaAnalytics tracking code, then visit a tracked page using the above URL parameters where the tracked page has a few autoplaying videos)
Context
Your Environment
Referrers
MarketingCampaignsReporting
MediaAnalytics
The text was updated successfully, but these errors were encountered: