mod_usertrack.html revision 8963f69f11b106d3dc23f07aaf5ae6579e2111ce
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<HTML>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<HEAD>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<TITLE>Apache module mod_usertrack</TITLE>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync</HEAD>
ad27e1d5e48ca41245120c331cc88b50464813cevboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<BODY>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<!--#include virtual="header.html" -->
5c65eaa08f2ec993a19c9bef6e5463918e40e0ebvboxsync<H1>Module mod_usertrack</h1>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncPrevious releases of Apache have included a module which generates a
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync'clickstream' log of user activity on a site using cookies. This was
2a21a474a93152e7a1637578953dfc3093f374b2vboxsynccalled the "cookies" module, mod_cookies. In Apache 1.2 and later this
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncmodule has been renamed the "user tracking" module,
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncmod_usertrack. This module has been simplified and new directives
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncadded.
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<hr>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<h2>Logging</h2>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncPreviously, the cookies module (now the user tracking module) did its
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncown logging, using the <tt>CookieLog</tt> directive. In this release,
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncthis module does no logging at all. Instead, a configurable log
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncformat file should be used to log user click-streams. This is possible
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncbecause the logging module now allows <a
2a21a474a93152e7a1637578953dfc3093f374b2vboxsynchref="/multilogs.html">multiple log files</a>. The cookie itself is
2a21a474a93152e7a1637578953dfc3093f374b2vboxsynclogged by using the text <tt>%{cookie}n </tt>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncin the log file format. For example:
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<pre>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncCustomLog logs/clickstream "%{cookie}n %r %t"
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync</pre>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncFor backward compatibility the configurable log module implements the
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncold <tt>CookieLog</tt> directive, but this should be upgraded to the
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncabove <tt>CustomLog</tt> directive.
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<h2>Directives</h2>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<ul>
74cbfe8cd9e0617fc789820f0e81e995df2fd7a0vboxsync<li><a href="#cookieexpires">CookieExpires</a>
74cbfe8cd9e0617fc789820f0e81e995df2fd7a0vboxsync<li><a href="#cookietracking">CookieTracking</a>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync</ul>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<hr>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<a name="cookieexpires"><h2>CookieExpires</h2></A>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<strong>Syntax:</strong> CookieExpires <em>expiry-period</em><br>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<strong>Context:</strong> server config, virtual host<br>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<strong>Status:</strong> optional<br>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<strong>Module:</strong> mod_usertrack<p>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncWhen used, this directive sets an expiry time on the cookie generated
fd50d469f529bf08da58eb189b69a2addbb900cdvboxsyncby the usertrack module. The <i>expiry-period</i> can be given either
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncas a number of seconds, or in the format such as "2 weeks 3 days 7
2a21a474a93152e7a1637578953dfc3093f374b2vboxsynchours". Valid denominations are: years, months, weeks, hours, minutes
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncand seconds.
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
fd50d469f529bf08da58eb189b69a2addbb900cdvboxsync<p>If this directive is not used, cookies last only for the current
fd50d469f529bf08da58eb189b69a2addbb900cdvboxsyncbrowser session.</p>
be9fadccd7be6b962b3b646a99bc698909ad5e79vboxsync
fd50d469f529bf08da58eb189b69a2addbb900cdvboxsync<a name="cookietracking"><h2>CookieTracking</h2></A>
fd50d469f529bf08da58eb189b69a2addbb900cdvboxsync<strong>Syntax:</strong> CookieTracking <em>on | off</em><br>
fd50d469f529bf08da58eb189b69a2addbb900cdvboxsync<strong>Context:</strong> server config, virtual host, directory,
fd50d469f529bf08da58eb189b69a2addbb900cdvboxsync.htaccess<br>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<strong>Override:</strong> FileInfo<br>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<strong>Status:</strong> optional<br>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<strong>Module:</strong> mod_usertrack<p>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncWhen the user track module is compiled in, and "CookieTracking on" is
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncset, Apache will start sending a user-tracking cookie for all new
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncrequests. This directive can be used to turn this behavior on or off
2a21a474a93152e7a1637578953dfc3093f374b2vboxsyncon a per-server or per-directory basis. By default, compiling
fd50d469f529bf08da58eb189b69a2addbb900cdvboxsyncmod_usertrack will not activate cookies.
fd50d469f529bf08da58eb189b69a2addbb900cdvboxsync
fd50d469f529bf08da58eb189b69a2addbb900cdvboxsync
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync<!--#include virtual="footer.html" -->
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync</BODY>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync</HTML>
2a21a474a93152e7a1637578953dfc3093f374b2vboxsync