mod_usertrack.html revision 1e895b30bf4833c928334fad80fac8be169ab877
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin BGCOLOR="#FFFFFF"
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin TEXT="#000000"
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin LINK="#0000FF"
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin VLINK="#000080"
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin ALINK="#FF0000"
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin<!--#include virtual="header.html" -->
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey ShabalinPrevious releases of Apache have included a module which generates a
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin'clickstream' log of user activity on a site using cookies. This was
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Grabercalled the "cookies" module, mod_cookies. In Apache 1.2 and later this
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalinmodule has been renamed the "user tracking" module,
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalinmod_usertrack. This module has been simplified and new directives
c63c04fcaf1c3a78c70500eae253d72fa9c8358aTAMUKI ShoichiPreviously, the cookies module (now the user tracking module) did its
c63c04fcaf1c3a78c70500eae253d72fa9c8358aTAMUKI Shoichiown logging, using the <tt>CookieLog</tt> directive. In this release,
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graberthis module does no logging at all. Instead, a configurable log
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graberformat file should be used to log user click-streams. This is possible
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graberbecause the logging module now allows <a
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graberhref="/multilogs.html">multiple log files</a>. The cookie itself is
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graberlogged by using the text <tt>%{cookie}n </tt>
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalinin the log file format. For example:
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey ShabalinFor backward compatibility the configurable log module implements the
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalinold <tt>CookieLog</tt> directive, but this should be upgraded to the
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin<li><a href="#cookieexpires">CookieExpires</a>
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin<li><a href="#cookietracking">CookieTracking</a>
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin<h2><a name="cookieexpires">CookieExpires</A></h2>
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalin<strong>Syntax:</strong> CookieExpires <em>expiry-period</em><br>
b031f0d2ca1b40eab86286b82d3c5e8b379122e6Alexey Shabalin<strong>Context:</strong> server config, virtual host<br>
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey ShabalinWhen used, this directive sets an expiry time on the cookie generated
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalinby the usertrack module. The <i>expiry-period</i> can be given either
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalinas a number of seconds, or in the format such as "2 weeks 3 days 7
262f4e48a51a55ad9cee06abbcfe4a6ad6166f49Alexey Shabalinhours". Valid denominations are: years, months, weeks, hours, minutes
b031f0d2ca1b40eab86286b82d3c5e8b379122e6Alexey Shabalin<p>If this directive is not used, cookies last only for the current
b031f0d2ca1b40eab86286b82d3c5e8b379122e6Alexey Shabalinbrowser session.</p>
b031f0d2ca1b40eab86286b82d3c5e8b379122e6Alexey Shabalin<h2><a name="cookietracking">CookieTracking</A></h2>
b031f0d2ca1b40eab86286b82d3c5e8b379122e6Alexey Shabalin<strong>Syntax:</strong> CookieTracking <em>on | off</em><br>
b031f0d2ca1b40eab86286b82d3c5e8b379122e6Alexey Shabalin<strong>Context:</strong> server config, virtual host, directory,
b031f0d2ca1b40eab86286b82d3c5e8b379122e6Alexey ShabalinWhen the user track module is compiled in, and "CookieTracking on" is
b031f0d2ca1b40eab86286b82d3c5e8b379122e6Alexey Shabalinset, Apache will start sending a user-tracking cookie for all new
b031f0d2ca1b40eab86286b82d3c5e8b379122e6Alexey Shabalinrequests. This directive can be used to turn this behavior on or off
b031f0d2ca1b40eab86286b82d3c5e8b379122e6Alexey Shabalinon a per-server or per-directory basis. By default, compiling
b031f0d2ca1b40eab86286b82d3c5e8b379122e6Alexey Shabalinmod_usertrack will not activate cookies.
b031f0d2ca1b40eab86286b82d3c5e8b379122e6Alexey Shabalin<!--#include virtual="footer.html" -->