You can run IQJam in your company on your Domino server. Learn how...
Username: Password:
Reset Password | Register
 
Home | Leader Board | Tags | Help
Back to view...
How do you count downloads for an attached file? 
If I attach a file to a web page so people can download it.  How do you could how many times it's actually been downloaded?  Is there a different method for traditional web dev compared to XPages?  Do you need to farm the log or can you do something else?
Domino Development / Web Development
David Leedy - 11 months ago |  |  | Viewed 78 times

There are 3 Answers

6votes
Marked as correct on: 12/22/09 11:26 AM
There's no simple way that I know of. What I'd do, is construct a URL that points to an agent which logs the download and then redirects the request to the file itself.

So the URL might look like: .../mydb.nsf/agDownload?openagent&file=/myview/mydoc/$FILE/myfile.txt

It wouldn't stop people who know how to construct Domino URLs from hacking the URL but it would cover 99% of the population.


Matt White - 11 months ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community


0votes
Wow.  cool and simple idea.  Thanks.  I'll give that a try!


David Leedy - 11 months ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community


0votes

Or you could (if you want an alternative) attach an event to the dl-url that triggers a call to a log function (xhr style).

I have used this (or a similar technique) with Google Analytics.



Fredrik Stöckel - 10 months ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community


 

Experts for Domino Development / Web Development