Downloads in both folders link to folder1/files/file-to-download.zip
Visits seem to be tracked correctly but not downloads and outlinks. It seems almost random. I can download several different files and not a single download is being tracked. I can click outlinks and they are not tracked. But still, from time to time some downloads and outlinks pop up in the stats.
I have no idea where to start, so I appreciate any help. Thanks.
I think I just made sure something is definitely broken for me. I created a download on a private site, downloaded it, deleted it. The download never showed up in the stats.
When a user clicks to download a file, or clicks on an outbound link, Piwik records it. In order to do so, it adds a small delay before the user is redirected to the requested file or link. We use a default value of 500ms.
You can set this delay to a shorter length of time (to reduce the delay between the click and the download starting but you will track less clicks), or you can set it to longer time (if you want to track more downloads/outlinks, you might want to set it to 750). However, setting the timer higher than 500 might cause users to feel the delay between their clicks and the redirect, so use it with care.
I am also not seeing any outlinks in my stats. I tried the fix mentioned above (750 milliseconds) but it hasn’t had any effect. All the links are standard HTML links.
Check other JavaScript on your page that implement click handlers, e.g., lightboxes. A recurring problem is that the third-party click handler returns a value causing the browser to cancel other registered click handlers (e.g., Piwik’s link tracker).
Somehow the code above is converting these into smileys (I added the spaces to prevent the smileys from showing) : "http://stats.mydomain.com/ " ) ; script % 3 E " ) ) ;
I tried it both with and without the optional 750 milliseconds statement. I even tried setting it to 2000ms. No difference – none of my outlinks are tracked. Pageviews are tracked.
I also tried deleting the section to make sure the tracking wasn’t happening through the image tracker. That made no difference, so the pageviews are being tracked through Javascript.
(I changed the https references to http because that works better on my server (shared hosting), but I also tried with https just to be sure that wasn’t the problem either.)
Sorry, it looks like this was a combination of 2 problems at my end:
I did need to change the click delay to 750ms (it didn’t work at 500, 650 or even 700), and
I think maybe the old page (without click delay code) was caching somehow. Now I am receiving the new pages with the 750ms delay and the outlinks are registering.
Do you happen to know what method Statcounter uses to track outlinks (which they call “exit links”)? I’ve never had a problem with tracking outlinks through Statcounter, and I’m not sure whether they use a click delay.