getAttributionCampaignName() return no results on CrossLinkedDomain


(Pak Kriss) #1

(since I cannot use sample links due to restriction in the forum I use placeholder instead)

Scenario:

  1. Landing and visiting page is aaa?pk_campaign=123
  2. Continue with click to link to bbb which result in a bbb?pk_vid=44dea…
  3. landing and visiting bbb while piwikTracker.getAttributionCampaignName() return “”
  4. Visiting matomobbb show one unique visitor of both pages with right campaign name 123
BrowserConsole@aaa:
_paq.push([function () {
    var attributionInfo = this.getAttributionInfo();
    console.info(attributionInfo)
}]);
return: ["123", "", 1538537785, ""]
_paq.push([function () {
    var attributionInfo = this.getVisitorInfo();
    console.info(attributionInfo)
}]);
return: ["0", "44dea…", "1538537785", "1", "1538538132", "1538537785", ""]

BrowserConsole@bbb:
_paq.push([function () {
    var attributionInfo = this.getAttributionInfo();
    console.info(attributionInfo)
}]);
return: ["", "", 0, ""]
_paq.push([function () {
    var attributionInfo = this.getVisitorInfo();
    console.info(attributionInfo)
}]);
return: ["0", "44dea…", "1538537838", "1", "1538537838", "1538537838", ""]

Matomo code snippet…..
_paq.push(["setDomains", [".bbb.com",".www.aaa.com"]]);
_paq.push(["enableCrossDomainLinking"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);

What need to be done to keep the campaign name while visiting multiple cross linked domains?

Please advise.


(Pak Kriss) #2

Re-cap: I would recommend to have a solution around like using the Matomo Tag Manager and using predefined variables like {{FirstVisitCampaignName}} or {{LastVisitCampaignName}} which eliminate this kind of problems.