Hello All,
I would like to track how many site visitors are downloading
specific files from my web application. I have set up a template
that records the time/date the user requests the file into an
ActivityTracking table in my db, and then dynamically sends them
the file via CFCONTENT.
For example:
1. User clicks link
2. CF template stores the request in the database along with
the date/time
3. CF sends the user the file via CFCONTENT
I want to be able to distinguish between someone repeatedly
downloading the same file (hits), and someone downloading it for
the first time within a given time frame (visits).
My first instinct was to put a cookie on a user's machine
after they download the file, and look for that cookie, the next
time they click on the link. However, if the user has cookies
disabled or deletes their cookies, this method won't work. The site
would see this as a new visitor.
My next instinct was to check the IP address of the user and
look for a duplicate within my Activity Tracking table in the
database. However, if the user is behind a proxy, firewall, etc. I
may not get an accurate count of visitors downloading the file.
There must be a way to utlize both methods (or perhaps an
even better method) for figuring out if the user has downloaded the
file before (say, within a given timeframe like 1 hour).
I've seen this kind of logic before in online polls. For
example, the polls on the howard stern web site
www.howardstern.com
do a very good job at ensuring no duplicate poll submissions from
the same computer, but still allow different computers with the
same IP to access the poll. I can fill out their poll, delete my
cookies, block cookies, and not be allowed to re-submit the poll
again. I can then go to my laptop which uses the same external IP
address as my desktop and be able to fill out the poll as if I was
a new user. If the system were blocking the IP, they would have
blocked my laptop too. This is the type of logic I would like to
use for my web application.
Any thoughts?
Thanks,
David Levin