The question is "Best way to count number of downloads of several files on website"
What I am trying to do:
- Track and tally the number of downloads of Several files
- For files which have different extensions. (foo.zip, bar.tar.gz, foo2.zip)
- Avoid relying on server side code.
I've seen multiple answers for counting the file's downloads with the Apache access.log
cat /path/to/access.log | grep foo.zip | grep 200 | wc -l
from Best way to count file downloads on a website
, which is an eloquent solution however requires access to the backend log file. I was hoping to use an mostly-javascript solution, Which could also make a call to a php portion of code.