Download tracking but no outlink tracking

hi,

I am a newbie with piwik.
I have installed piwik for having basic statistics on my web site (a photo blog).

as said in the title, I wish to have download tracking but no outlink tracking (in fact, I have published some theme for the CMS zenphoto and I wish to have specifics stats of downloading).

how can i do ?

  • disable the download & outlink tracking and force a click on a link to be recorded as a download in Piwik ?

so the tracking code will look like


piwikTracker.setDocumentTitle(document.title);
//piwikTracker.enableLinkTracking();
piwikTracker.trackPageView();

with this class on the relevant links

class='piwik_download'

I am OK ?

hi

I disabled the monitoring of outlink and set the class ‘piwik_download’ to forcetracking of specific downloads.
but the results are not good: I do not see any specific downloads.

info: currently, I use phpMyVisit (version installed by default by my ISP Free) and piwik.
I test the correct configuration of Piwik and the proper integration on my site before migrating all on a new hoster.

there is the code of my footer


<!-- phpmyvisites -->
<a href="http://st.free.fr/" title="phpMyVisites | Open source web analytics"
onclick = "window.open(this.href); return(false);"><script type="text/javascript">
<!--
var a_vars = Array();
var pagename = 'zpArdoise 1.4';

var phpmyvisitesSite = 204639;
var phpmyvisitesURL = "http://st.free.fr/phpmyvisites.php";
//-->
</script>
<script language="javascript" src="http://st.free.fr/phpmyvisites.js" type="text/javascript"></script>
<object><noscript><p>phpMyVisites | Open source web analytics
<img src="http://st.free.fr/phpmyvisites.php" alt="Statistics" style="border:0" />
</p></noscript></object></a>
<!-- /phpmyvisites -->

<!-- Piwik Tracking Code -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://avbo7291.o2switch.net/piwik/" : "http://avbo7291.o2switch.net/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.setDocumentTitle("zpArdoise 1.4");
//piwikTracker.enableLinkTracking();
piwikTracker.trackPageView();
} catch( err ) {}
</script><noscript><p><img src="http://avbo7291.o2switch.net/piwik/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->

and there is the link to track :


<p>
<a class="piwik_download" title="zpArdoise 1.4" href="http://st.free.fr/phpmyvisites.php?url=http%3A//vincent.bourganel.free.fr/data/zpArdoise%201.4.zip&id=204639&pagename=FILE:zpArdoise%201.4" target="_blank"><img style="float: left; margin-top: -20px; margin-right: 10px;" title="zpArdoise 1.4" src="http://vincent.bourganel.free.fr/zenphoto/themes/zpArdoise/images/download.png" alt="zpArdoise 1.4" />zpArdoise 1.4.zip</a>
</p>

please, could you help me ?
thanks in advance

You need to leave piwikTracker.enableLinkTracking(); to track downloads.
It will also track outlinks but it should be fine, even if you don’t need the data?

hi

thanks for your reply

ok, whith i will follow outlinks, even if I don’t need the data.

but, my tests between phpMyVisit and piwik are not concluant : I am unable to follow the download of specific files with piwik.
I want only tracking specific downloads and I don’t want to follow other download (I do not mix - or walnut - the results supplied)

for my needs, should I do like that :
1/ configure the script : piwikTracker.setDownloadExtensions("") (-> no file extention to follow)
2/ add class=“piwik_download” on my specifics links to follow as a download ?

thanks for your help.

vincent3569, I think your proposal will work .setDownloadExtensions("")

please test it and report here if it works :slight_smile:

hi

After some test, unfortunately, this does not work.

there a link to anonymous report : http://avbo7291.o2switch.net/piwik/
and there, a link of my website (i want to track the dowload of the zip file) : http://vincent.bourganel.free.fr/zenphoto/index.php?p=pages&title=zpardoise-1.4

the specific links are shown as outlink but not as download.

can you help me to configure piwik for doing what i want to do ?

This is by design, if the files are not on the same domain as your website, then it will be counted as outlinks…

the files to track are is on the same domain as my website (vincent.bourganel.free.fr).

but the link is a “composite one” : it allows to phpMyVisit to tack those files.
that’s why I added the class=“piwik_download” to force tracking.

zpArdoise 1.4.zip

it is a temporary solution, and to compare piwik and phpMyVisit before switching to piwik.
do you have any solution for me ?

Switch to Piwik directly, Phpmyvisites is not supported anymore and I can promise you that Piwik is a lot better :slight_smile: