This PR provides the possibility to configure a list of host excluded from referrer detection.
The list can be maintained globally, as well as enriched per site.
Referrer on that exclusion list will be ignored on PHP side and such hits will be handled as DIRECT entry.
@sgiehl I haven't reviewed yet, but based on your comment in the other issue, can we add
paypal.com to the "global" list of excluded referrers so that users don't have to configure it and it just works for people out of the box?
I'm not able to say if there might be reasons for someone to not having it excluded, but yes, I can let it be added to the list once on update or install.
@bx80 I've created a PR for the developer docs, so the new methods will be documented. Feel free to review and merge that one.
In addition I've updated the FAQ: https://matomo.org/faq/how-to/how-do-i-add-a-referral-exclusion-in-matomo/
@sgiehl didn't check the UI, but was checking the UI tests and noticed in https://github.com/matomo-org/matomo/blob/6f76e4fdbd183f729900d5a7286d5e281ac7d22a/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_global_settings.png that it doesn't show "paypal.com" in the field - i would have expected the screenshot test to show 'paypal.com' so it doesn't regress in the future?
Haven't added that yet, but still having that in mind. The discussion in the other issue is still ongoing and I'm not sure if adding paypal by default is that much of help
Yes it is of much help and is needed, so let's add it so it actually fixes the issue for people :+1:
Let's add Paypal.com to our core JS tracker code so it's not an issue for Paypal - that's a big reason of why we do this work.
(by adding to the core code, then we don't make the JS tracker embedded in users site "ugly" and showing paypal - instead it's hidden in the big minified JS code)
@mattab There are so many other payment providers and other services like SSOs, that might then still produce the same issue. Also having a hard coded list, might in the end cause problems for users that might expect e.g. paypal from referring users to their site.
It still feels a bit like trying to provide a workaround for an issue we might not yet have identified correctly.
Let's start with the workaround and see how it goes (pragmatic) so we can move on from this and fix the high impact issues.