Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to track a completed file download in ASP.NET
    text
    copied!<p>I have <a href="http://www.ko-sw.com" rel="noreferrer">this ASP.NET web site</a> that allows users to download program installation packages (just normal files). I want to be able to track when a download is completed (i.e. the file has been fully downloaded to the user's computer) and then invoke a Google Analytics script that reports a completed download as a 'Goal' (obviously, one of my goals is to increase file downloads).</p> <p>The problem is that I need to support direct file URLs, as opposed to the "redirect page" solution. This is because a lot of traffic comes from software download sites that explicitly demand a direct file URL when submitting a product. Perhaps, they do their own file analysis (i.e. virus checking). But with this set of limitations, a typical scenario is:</p> <ol> <li>The user visits my product listing on a software download site</li> <li>The user clicks the "Download" button on this site</li> <li>The "Download" page is typically a redirect that finally brings the user to my file via the direct URL I've initially submitted, i.e. <code>http://www.ko-sw.com/somefile.exe</code></li> </ol> <p>If under these conditions, an exact solution for monitoring is not possible, maybe there exists a workaround? What comes to my mind is temporarily storing the number of performed downloads on the server and then accessing an administrative page that somehow reports this number to Google Analytics and finally sets it back to zero. With this workaround, there is at least no need to try to attach a javascript handler to a non-HTML resource. But even then there are issues:</p> <ol> <li>How to track if a download has completed?</li> <li>How to track user geolocation and browser capabilities to make them further visible in the reports?</li> </ol> <p>Thanks everybody in advance</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload