• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

how to track visitors?

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm at a lost. I need to track visitors who come to the site (IP, referer, browser, etc...) but I'm not sure how to do that in the best way. I thought of tracking unique visitor when a new session is created, but it seems to be impossible to get visitor's info when using SessionListener. But how else to am I suppose to get user's info whenever a new session is created?

Does anyone have any idea how to do tracking? Maybe someone can share their experience.

Help would be appreciated

D.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at this to get started.
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20514811.html
Be sure to read Kenneth's final suggestions.
 
rick zorich
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It would be nice if you posted your final code here.
 
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would look for a free web log analyzer to do that kind of thing. My site uses webalizer and I like it.

http://www.mrunix.net/webalizer/
 
Daniil Sosonkin
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to have live charts so webalizer won't help.

Thanks for the link, rick, sounds like a plan! I'll be working on it today and place results here.
 
Daniil Sosonkin
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I've worked it out and now able to track visitors. Thanks for direction. The code is below. It only tracks and doesn't count current visitors (for that I have a SessionListener). Visits are stored in the database and allow for tracking of what visitor actually went through. This assumes that new session is a new visitor (maybe not entirely correct, but I just can't think of anything better). Enjoy:

Tracker.java (filter)
===============================



web.xml
==========================================
<filter>
<filter-name>Tracker</filter-name>
<filter-class>com.fototalk.filters.Tracker</filter-class>
</filter>

<filter-mapping>
<filter-name>Tracker</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
 
rick zorich
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Daniil, thanks for sharing. rick
 
Seriously Rick? Seriously? You might as well just read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic