Welcome to the IBM Collaboration Solutions Community IQJam.
UsernamePassword
Reset Password | Register
   
Home | Leader Board | Tags | Help
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 - over 2 years ago |  |  | Viewed 97 times

There are 3 answers

6votes
Marked as correct on12/23/09 3: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 - over 2 years 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 - over 2 years 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 - over 2 years 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

There are no experts to display