mod_usertrack.html revision 6050a0d43cbe3dc3bdb304d60942ff19c0ffc083
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
fdd80e9a55c70b36a3bf3e409b86897301c44ff8Automatic Updater<HTML>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<HEAD>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<TITLE>Apache module mod_usertrack</TITLE>
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater</HEAD>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<BODY
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont BGCOLOR="#FFFFFF"
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont TEXT="#000000"
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont LINK="#0000FF"
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont VLINK="#000080"
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont ALINK="#FF0000"
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<!--#include virtual="header.html" -->
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<H1 ALIGN="CENTER">Module mod_usertrack</h1>
fdd80e9a55c70b36a3bf3e409b86897301c44ff8Automatic Updater
2a31bd531072824ef252c18303859d6af7451b00Francis DupontPrevious releases of Apache have included a module which generates a
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont'clickstream' log of user activity on a site using cookies. This was
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontcalled the "cookies" module, mod_cookies. In Apache 1.2 and later this
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontmodule has been renamed the "user tracking" module,
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontmod_usertrack. This module has been simplified and new directives
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontadded.
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
922312472e2e05ebc64993d465999c5351b83036Automatic Updater<hr>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<h2>Logging</h2>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis DupontPreviously, the cookies module (now the user tracking module) did its
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontown logging, using the <tt>CookieLog</tt> directive. In this release,
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontthis module does no logging at all. Instead, a configurable log
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontformat file should be used to log user click-streams. This is possible
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontbecause the logging module now allows <a
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrewshref="/multilogs.html">multiple log files</a>. The cookie itself is
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontlogged by using the text <tt>%{cookie}n </tt>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontin the log file format. For example:
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<pre>
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCustomLog logs/clickstream "%{cookie}n %r %t"
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont</pre>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis DupontFor backward compatibility the configurable log module implements the
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontold <tt>CookieLog</tt> directive, but this should be upgraded to the
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontabove <tt>CustomLog</tt> directive.
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<h2>Directives</h2>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<ul>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<li><a href="#cookieexpires">CookieExpires</a>
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic Updater<li><a href="#cookietracking">CookieTracking</a>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont</ul>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
fdd80e9a55c70b36a3bf3e409b86897301c44ff8Automatic Updater<hr>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<h2><a name="cookieexpires">CookieExpires</A></h2>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<strong>Syntax:</strong> CookieExpires <em>expiry-period</em><br>
28b3569d6248168e6c00caab951521cc8141a49dAutomatic Updater<strong>Context:</strong> server config, virtual host<br>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<strong>Status:</strong> optional<br>
c7d32c0b0ff4c01f0d4479af3410d3c06044d48aAutomatic Updater<strong>Module:</strong> mod_usertrack<p>
c7d32c0b0ff4c01f0d4479af3410d3c06044d48aAutomatic Updater
c7d32c0b0ff4c01f0d4479af3410d3c06044d48aAutomatic UpdaterWhen used, this directive sets an expiry time on the cookie generated
c7d32c0b0ff4c01f0d4479af3410d3c06044d48aAutomatic Updaterby the usertrack module. The <i>expiry-period</i> can be given either
c7d32c0b0ff4c01f0d4479af3410d3c06044d48aAutomatic Updateras a number of seconds, or in the format such as "2 weeks 3 days 7
2a31bd531072824ef252c18303859d6af7451b00Francis Duponthours". Valid denominations are: years, months, weeks, hours, minutes
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontand seconds. If the expiry time is in any format other than one
fdd80e9a55c70b36a3bf3e409b86897301c44ff8Automatic Updaternumber indicating the number of seconds, it must be enclosed by
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontdouble quotes.
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<p>If this directive is not used, cookies last only for the current
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontbrowser session.</p>
28b3569d6248168e6c00caab951521cc8141a49dAutomatic Updater
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater<h2><a name="cookietracking">CookieTracking</A></h2>
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater<strong>Syntax:</strong> CookieTracking <em>on | off</em><br>
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater<strong>Context:</strong> server config, virtual host, directory,
28b3569d6248168e6c00caab951521cc8141a49dAutomatic Updater.htaccess<br>
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic Updater<strong>Override:</strong> FileInfo<br>
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic Updater<strong>Status:</strong> optional<br>
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic Updater<strong>Module:</strong> mod_usertrack<p>
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic UpdaterWhen the user track module is compiled in, and "CookieTracking on" is
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updaterset, Apache will start sending a user-tracking cookie for all new
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic Updaterrequests. This directive can be used to turn this behavior on or off
2a31bd531072824ef252c18303859d6af7451b00Francis Duponton a per-server or per-directory basis. By default, compiling
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontmod_usertrack will not activate cookies.
28b3569d6248168e6c00caab951521cc8141a49dAutomatic Updater
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<!--#include virtual="footer.html" -->
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont</BODY>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont</HTML>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont