View Full Version : Tracking Downloads

04-28-2004, 12:46 AM
Here is the senario summarized:

When someone downloads a trial of our app, we need a conformation page to popup as soon as the download is complete for this app. the this app for stat purposes. If at all possible we only want to track unique completed downloads, but at this point we will take just the completed downloads. One this confo page will be a "tracking" link that will report back to the server that the app has been completed, for a paticular source.

I have everything else figured out but i do not know how get that confo page to popup once the app is done. Do any of you know how to accomplish this?


04-28-2004, 05:12 AM
I don't think it's possible to detect if download is complete. You can track how many times the file is "downloaded" (just like this forum does on thread attachments) but you don't know how many users actually cancels the downloading process. By "downloaded", I mean the request to fetch the file was processed by the server and the response to the client is already sent (Download dialog is displayed). By the time the user chooses Save or Open, javascript has no access to his choice, more so to the completeness of the download.

04-28-2004, 05:17 AM
well i heard it was possible, and i thought asp would do it, but i got a big no on it, and someone said javascript might, so i am at a loss, but i have to figure out some way to work it heh.........

04-28-2004, 06:40 PM
I don't think it's possible either, and certainly not with javascript - you've no way of knowing if somebody completely downloaded a file - all you can do is log how many start to download it.

04-28-2004, 06:52 PM
Well. . .
Just a thought, IE only, but you could use ActiveX and JavaScript to check for the existance of the file and return the file size in case it allowed for a partial download. Don't have time to test or show an example but here is a good reference link. The more knowledgeable may be able to tell you if it is a waste of time to try or not.

http://www.webreference.com/js/column71/8.html (http://)


04-28-2004, 06:59 PM
this helps some.

All i am trying to do is get a page to popup once the download is complete. The tracking is more or less taken care of....if i cant get the popup to happen, i can't even start thinking about tracking lol

thanks for help thus far :)

04-28-2004, 08:15 PM
You can do this in a server side language. All you need to do is serve the download using your own script rather than letting the web server do it. That way, you can detect when the user clicks cancel or when the download is complete. You can then update a database from this script and let the javascript on the HTML page poll for the completion of the download by querying the server. Kind of long winded, but technically it is feasible.