Download statistic?

Hi,

on my website i offer a file to download. Therefore i put a meta refresh tag on the site which directs the user to the file. Like this one:

<meta http-equiv="refresh" content="3; url=http://…/file.zip">

I also add a link directly to the file if the redirect wont work.

I have downloaded the file the last days a couple of times. But piwik has no data in the category action/downloads! Everything else (User statistics, …) works great!

What i need to change that the downloads are displayed in the statisics?

piwik won’t track your download through the meta refresh. You can try using the redirect parameter. (Examples in global.ini.php)

Not sure why your direct link isn’t being tracked. Are you using 0.2.34? are you adding the link dynamically to the page?

Thanks for your help. Maybe the direct link work. Dont now if i used the link or the refresh last days. I will check tomorrow.

Before the user see the redirect page he has to submit a form. This form will load this url:

http://domain.tld/lic/?download=ok

does this url work with:

; variable name used to specify a download link
; Example: ‘/piwik.php?idsite=1&download=http://piwik.org/piwik.zip’ will redirect to ‘http://piwik.org/piwik.zip
download_url_var_name = download

Because of security reasons i dont put the complete filename and url to the url.
Does it work?

Or can i put a special variable (maybe in js) on this page “http://domain.tld/lic/?download=ok” so every time this site is loaded the download of file “test” will be counted one up?

In this case, you’re probably want to call piwik_track() in your form via JavaScript.