Check how many times the file was downloaded?

I have a zip file on a website running on a Windows 2008 / IIS7 server. Is there a way to check how many times this file has been downloaded?

+3
source share
3 answers

You can do it differently

(in order of increasing complexity and stupidity);)

  • Provide a direct link to the file and track your weblogs. You can use Microsoft's LogParser tool to run SQL, such as log queries, to retrieve the necessary data.

  • Do not provide a direct link to the file. Instead, click the button. When the button is pressed, you increase the counter and serve the file.

  • URL (, bit.ly) - ..

    . "+" URL- bit.ly, . .

    - . :

    shortcode1 - Path1\File1.ext
    shortcode2 - Path2\File2.ext
    ...
    shortcodeN - PathN\FileN.ext

    zip :

    http://www.yoursite.com/getFile.aspx?code=shortcode1

    getFile.aspx , , , Path1\File1.ext .

  • , , /. http://www.iis.net/community/default.aspx?tabid=34&g=6&i=1494

  • / ISAPI

  • .zip ASP.Net IIS .

+4

, . awstats webalizer.

.

, .

, , .

0

Or you directly track it using Google Analytics

<a href="http://www.example.com/files/map.pdf" onClick="javascript: _gaq.push(['_trackPageview', '/downloads/map']);"> 

more about this here .

0
source

Source: https://habr.com/ru/post/1760202/


All Articles