Tracking outlinks/downloads


I setup/installed piwik, but cant seem to get the outlinks/downloads working.

The visitors seem to be coming in and tracking OK, but I have a .exe on my site, but it never gets tracked when downloaded?? I tried the (class=“piwik_download”) but that didn’t work either

Any thoughts?

Thanks in advance

Are you still facing issues ?

If so, could you paste the html code of the link which enables people to download your .exe file.

Could you as well paste the Piwik javascript code you have on the very same page of the download link.

I have the latest piwik. 1.2.1.
Even for me, the download tracker is not working, Please find below the code.

<a href="" class="piwik_download button" id="ajaxdownloadcontent">Download </a>

The hyperlink does not end with an extension. Rather I handle it server side by forcing a download by using the wallpaper ID in the URL.

The following is my piwik javascript

try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
} catch( err ) {}

Is there a PHP alternative to track downloads in the server side?

same problem here

On the server side, you can use the libs/PiwikTracker/PiwikTracker.php class.

Using class=“piwik_download” should work. You’ll want to add the target="_blank" attribute to make sure it’s also trackable via Safari/Chrome/Webkit.

1 Like