Skip to main content
Known Participant
January 29, 2010
Question

how to add page hit counter to a linked document

  • January 29, 2010
  • 1 reply
  • 475 views

We have a hard coded link on the upper right side of the home page  for the communication document that is posted. They want to know if we can get a count of hits to that page.

when user  click on that link a word document will open and they need to know how many people are paying attention so they need hit counter for that. i have no idea how to do that , because i am  new to coldfusion.

Thanks

This topic has been closed for replies.

1 reply

Inspiring
January 29, 2010

Instead of linking to the document, link to a cold fusion page that increases your hit counter and then delivers the document to the person.

For delivering the document, you'll need to use the cfheader and cfcontent tags.  Googling the tag names leads you to the correct references very quickly.  For the hit counter, first you have to decide how you want this information stored.  That's a concept that applies to programming in general - don't try to code anything until you know what the code is supposed to accomplish.

tclaremont
Inspiring
February 1, 2010

They want to know "How many people", or "How many DIFFERENT people"?

One question requires you to log a simple increment to a counter. The other requrres you to log usernames ( or some sort of unique identifier ) so you can determine if the same person looked at the document 28 times.

Finally, just because someone opened the link, does not mean they read the document or further, understood it. For those reasons, it is my opinion that stats like this are just mumbo jumbo.