To set the attribution for a converted goal to the referrer of the first visit, I would like to use the function setConversionAttributionFirstReferrer .
At least that’s how I understood how it works, even if the documentation (here or here FAQ) isn’t very precise in this regard. But in this old issue it sounds like I want it.
I built a simple test setup to see why it doesn’t work in a more complex environment, but I notice that the referrer of the first visit is not used for the converted goal or only in a few cases.
_paq.push(['setConversionAttributionFirstReferrer',true]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//localhost/matomo/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
Here some findings:
- First visit: Referrer from other website, Recent visit with conversion: Referrer from campaign → Result: Attribution goes to campaign - wrong
- First visit: Referrer from campaign, Recent visit with conversion: Referrer from other campaign–> Result: Attribution goes to recent campaign - wrong
- First visit: Referrer from campaign, Recent visit with conversion: Referrer from other website–> Result: Attribution goes to campaign - right
- First visit: Referrer from website, Recent visit with conversion: Referrer from other website–> Result: Attribution goes recent website - wrong
I know this is all a little complicated. But maybe someone here has experience with this function.
Here are some screenshots:
1 post - 1 participant

