extend the list of file extensions to track as "Downloads"



I use the script for import apache2 log files in piwik. Now I want to change the list of file extensions to track as “Downloads”. The file has a variable DOWNLOAD_EXTENSIONS with all file extensions like:

    '7z aac arc arj asf asx avi bin csv deb dmg doc exe flv gz gzip hqx '
    'jar mpg mp2 mp3 mp4 mpeg mov movie msi msp odb odf odg odp '
    'ods odt ogg ogv pdf phps ppt qt qtm ra ram rar rpm sea sit tar tbz '
    'bz2 tbz tgz torrent txt wav wma wmv wpd xls xml z zip'

Can I extends this list without get problems by the next update of piwik? Exists a other proper way to extend this list?

(Matthieu Aubry) #2

which extension would you like to add?


hello matt

I will add the xml schema file extention: xsd

(Matthieu Aubry) #4

Added in Adding .xsd extension to file list, suggested in forum http://forum.p… · matomo-org/matomo@582f38f · GitHub


I was wondering on why the files with extensions listed in DOWNLOAD_EXTENSIONS do not show up under Actions > Downloads? Is there something additional I have to add when running the import script?


(Matthieu Aubry) #6

have you set --enable-static ?

It should work and they should appear in downloads.


yes, this is the line i am using

python /var/www/piwik/misc/log-analytics/ --url= /var/www/html/sitename/www/logs/access.old --idsite=4 --recorders=2 --enable-http-errors --enable-http-redirects --enable-static

(Matthieu Aubry) #8

can you post a short log file that can be used to reproduce the issue ? (eg. one or two lines that are not imported and you expected them to be)


just changed the folder and file names (not extension), but everything else is the same. - - [07/May/2010:10:18:08 -0400] "GET /foldername/filename.pdf HTTP/1.1" 200 79056 "" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.4; .NET CLR 2.0.50727)" - - [01/Jun/2010:15:55:01 -0400] "GET /foldername/filename.pdf HTTP/1.1" 200 81447 "" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"

(Matthieu Aubry) #10

Thank you for the report! I could reproduce it, and have created a ticket in our issue tracker: Importing a log file with only PDF files does not import data · Issue #5286 · matomo-org/matomo · GitHub


Thank you.