-
Notifications
You must be signed in to change notification settings - Fork 19
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
[Bug] If custom campaign parameters are set up in the config.ini.php, Matomo detects a new visit on any non-pageview action #157
Comments
@peterbo I tried replicating the same on my local instance and seems to work as expected Config
@araichyk @snake14 are you guys able to reproduce this issue locally ? |
@peterbo Still works as expected for me. |
It's strange, because I also found one instance, where this wasn't reproducible. I'm trying to find additional settings / plugins / things that these have in common, that might be involved in this. |
@peterbo did you maybe change the configuration |
Hey @sgiehl - the setting is the default (create_new_visit_when_campaign_changes = 1). When set to 0, it works correctly (all actions attributed to one session) |
@peterbo have you configured core and the plugin with the same parameters for campaigns? If not this might be the same issue as described here: matomo-org/matomo#18511 |
Core parameters are unmodified, so there is definitely an overlap with the MarketingCampaignsReporting settings. |
@AltamashShaikh I was unable to reproduce. All events were tracked under the same visit despite providing multiple campaign parameters. |
@AltamashShaikh which parameters did you test? I can see, that the campaign in your test is "test2" from the mtm_campaign parameter. If the config is set correctly, in my instances, Matomo always uses the utm_campaign parameter "test3". Did you enable / modify the config parameter "create_new_visit_when_campaign_changes"? Additionally, the bug only occurs, if both parameters have different values. I guess, that somewhere, there is an if-statement that compares the value of the other campaign-parameter with the currently attributed campaign and therefore always recognizes a new campaign with every action. Therefore a new visit. |
@peterbo My local URL is
|
@AltamashShaikh - in my instances, campaign_var_name is also set (default setting like yours). In Debug mode, I can see the following for the events that get split: Request (campaign test4 was recognized clientside):
Screenshot from Visitor Log (Campaign test5 was recognized serverside): |
@peterbo I just tested this scenario for a Matomo Cloud instance and I can confirm I see test2 as the referer_name always |
Oh I just saw, that your whole config for campaign_name (see https://plugins.matomo.org/MarketingCampaignsReporting) is missing from your [MarketingCampaignsReporting] config.ini.php. If you add this, you'll be able to reproduce. Sorry, I didn't spot this earlier. Thought you also copied that over from the Plugin description. And I also have an idea, what could be responsible. With this change, everything works correctly. So this is the problem. This seems to be an edge case, but is indeed a valid business case. Quite some marketing tools are auto-tagging with utm parameters, while marketers would like to use Matomo parameters with alternative content. |
@peterbo I was able to reproduce this one and seems to resolve if I update the config as below
|
@peterbo I was able to figure out the issue, In core to detect When we set below config, and if the URL is
|
@peterbo This needs a fix in Matomo core, I will try to send a PR, meanwhile to tackle the issue, you can update the config as below
|
@peterbo The fix won't work in 100% case and it actually be fixed by matomo-org/matomo#20067 |
@AltamashShaikh thanks for your efforts for finding & fixing this!! |
If custom campaign parameters are set up in the config.ini.php and used alongside standard parameters, Matomo detects a new visit on any action (e.g. https://example.org/?mtm_campaign=test2&utm_campaign=test3 while having [MarketingCampaignsReporting]
campaign_name = "utm_campaign" in youf config.ini.php):
When commented out, actions are correctly attributed to the initial visitor:
The text was updated successfully, but these errors were encountered: