about
i am currently working as an open source software developer/maintainer and freelancer. you can hire me for any of these tasks:
- system administration
- system programming
- web application development
- consulting
for detailed information take a look at my résumé. please note that i currently do unix/linux and open source/free software only.
contact
Benedikt Böhm
Berlin, Germany
- SMTP/XMPP
- bb@xnull.de
- IRC
- Hollow at irc.oftc.net or irc.freenode.net
- GPG
- key id: 0xB5FAF161
detailed information is available. don't forget to take a look at my xing profile and gulp.de profile.
mod_visitor
| Author: | Benedikt Böhm |
|---|---|
| Version: | 0.1 |
| Web: | http://bb.xnull.de/projects/mod_visitor/ |
| Source: | http://git.xnull.de/gitweb/?p=mod_visitor.git (also on github) |
| Download: | http://bb.xnull.de/projects/mod_visitor/dist/ |
mod_visitor is an apache module that provides a simple way to track site visitors with cookies using an invisible gif image.
Description
mod_visitor creates three tracking cookies, to identify unique visitors and unique visits:
- __vtc
- The c cookie has only session lifetime to identify each unique visit.
- __vtb
- The b cookie has a short lifetime to still identify a session if the user has closed his browser, but reopens it before the session time expires.
- __vta
- The a cookie has a long lifetime to identify each unique user.
mod_visitor provides a visitor-cookie handler for apache to serve the smallest possible gif image along with the above mentioned cookies. This way visitor tracking can be added easily to existing applications.
Installation
To compile and install this module, use apxs provided by the apache webserver:
apxs -i -a -c mod_visitor.c
Configuration
In your apache configuration add one or more Location directives to serve the tracking image:
<Location "/__vt.gif">
VisitorTracking On
SetHandler visitor-cookie
Allow from all
# visitor cookies expire after about 2 years
VisitorExpiry 63072000
# session cookies expire after 30 minutes
SessionExpiry 1800
</Location>
You can then use the %{visitor-cookie}n format string in mod_log_config to log the visitor cookie to a logfile.
Directives
- VisitorTracking On|Off
- Enable/Disable visitor tracking
- VisitorDomain domain
- Explicitly set cookie domain
- VisitorExpiry seconds
- Set expiry time of the visitor cookie (__vta) in seconds
- SessionExpiry seconds
- Set expiry time of the session cookie (__vtb) in seconds