views:

212

answers:

6

Hi everybody,

I have this ASP.NET web site 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).

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:

  1. The user visits my product listing on a software download site
  2. The user clicks the "Download" button on this site
  3. 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. http://www.ko-sw.com/somefile.exe

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:

  1. How to track if a download has completed?
  2. How to track user geolocation and browser capabilities to make them further visible in the reports?

Thanks everybody in advance

A: 

Hi Kerido, It's possible to track links as a goal, which may be of use to you. However, this won't track when the download was completed. http://www.google.com/support/analytics/bin/answer.py?answer=55529

Hope this helps. Cheers Tigger

Tigger
Thanks for that. Yeah, I've read it. If nothing works, I'll have to track links only. Let's see if something else materializes.
Kerido
Out of interest, why is it important that you know the download completed rather than they started the download?
Tigger
+6  A: 

Better alternative: Let your installer open up a web page once the user installed the web software. Example: See the Keepass installer.

You can track this opening rate in GA and get the numbers of installs.

SamMeiers
A: 

I think the solution of @SamMeiers is very good but you may optimized by calling a web services after the installation complete but you might find a small problem if the use installing the app in an environment without internet but you might force to check if there is an internet or not. You can create any trigger when you installation start as a start flag then when if finish check if the start flag exists then the app have been downloaded and installed also.

Pr0fess0rX
+2  A: 

According to awstats aborted download has http status code 206 so if you analyze server log for such code you can get those downloads that were not completed.

Giorgi
A: 

This link might be able to help you:

http://www.devx.com/dotnet/Article/22533/1954

I've used it as a reference before for some of my work.

Ryan Ternier
A: 

@Kerido ~ I'm curious what the business case is here. Are you trying to track installs or downloads? If installs, go with @SamMeiers solution.

However, if you're trying to track downloads, then the next question is what webserver base are you using? IIS? Apache? Something else?

In IIS, assuming you're using 7 (or later), you could (easily?) write a HttpHandler that checks for the last bytes of the file to be sent, and on that, record a log somewhere.

On Apache, just setup logging to tell you how many bytes were transferred (a trivial change in httpd.conf) and then parse the logs daily (awstats [amongst others] is pretty good for this, but you might have to write a sed/awk script) and find out how many full transfers were completed. Just depends on how thorough you're trying to be.

But I go back to, what's the business case for this? What does it matter if there were unfinished downloads?

drachenstern