@sgiehl opened this Pull Request on June 1st 2022 Member


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.

In addition it will be possible to define ignored referrers within the javascript tracker, so they are ignored for setting the referrer cookies and also not sent with tracking requests.

refs #18612


@mattab commented on June 28th 2022 Member

@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?

@sgiehl commented on June 28th 2022 Member

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.

@sgiehl commented on June 29th 2022 Member

@bx80 applied some fixes

@sgiehl commented on June 30th 2022 Member

@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/

@mattab commented on July 4th 2022 Member

@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?

@sgiehl commented on July 4th 2022 Member

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

@mattab commented on July 4th 2022 Member

Yes it is of much help and is needed, so let's add it so it actually fixes the issue for people :+1:

@sgiehl commented on July 5th 2022 Member

@mattab This will only have an impact on the PHP side of tracking. The tracking code would need to be updated by everyone to also reflect that on javascript side, which would be the more important part. Also I guess this might currently not be easily possible with TagManager.

@mattab commented on July 5th 2022 Member

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)

@sgiehl commented on July 5th 2022 Member

@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.

@mattab commented on July 5th 2022 Member

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.

This Pull Request was closed on June 30th 2022
Powered by GitHub Issue Mirror