Hi,
I’m using multiple Piwik trackers on a website, which works fine for logging visits, but apparently the downloads are tracked only once.
This code is used:
var _paq = _paq || [];
(function(){
var u=(("https:" == document.location.protocol) ? "https://URL/" : "http://URL/");
_paq.push(['setSiteId', 7]);
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['setSiteId', 1]);
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
var d=document,
g=d.createElement('script'),
s=d.getElementsByTagName('script')[0];
g.type='text/javascript';
g.defer=true;
g.async=true;
g.src=u+'piwik.js';
s.parentNode.insertBefore(g,s);
})();
As mentioned, logging visits works fine with the two SiteIds, but when clicking on a download link, only the second SiteId (1) logs the download click.
Viewing at the network http headers, only one request is submitted:
http://URL/piwik.php?download=&idsite=1&…
Any idea how to get the downloads tracked with both Trackers? Should I file a bug?