mod_usertrack.html.en revision 82489978ef71322bce18e6f92d2a938b87fd434e
1516N/A<?xml version="1.0" encoding="ISO-8859-1"?>
39N/A<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
39N/A<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
39N/A XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
39N/A This file is generated from xml source: DO NOT EDIT
39N/A XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
39N/A -->
39N/A<title>mod_usertrack - Apache HTTP Server</title>
39N/A<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
39N/A<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
39N/A<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
39N/A<link href="/images/favicon.ico" rel="shortcut icon" /></head>
39N/A<body>
39N/A<div id="page-header">
39N/A<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
39N/A<p class="apache">Apache HTTP Server Version 2.3</p>
39N/A<img alt="" src="/images/feather.gif" /></div>
39N/A<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
39N/A<div id="path">
39N/A<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Modules</a></div>
39N/A<div id="page-content">
926N/A<div id="preamble"><h1>Apache Module mod_usertrack</h1>
926N/A<div class="toplang">
3312N/A<p><span>Available Languages: </span><a href="/en/mod/mod_usertrack.html" title="English">&nbsp;en&nbsp;</a></p>
926N/A</div>
39N/A<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>
3339N/A<em>Clickstream</em> logging of user activity on a site
2453N/A</td></tr>
3194N/A<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
3194N/A<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>usertrack_module</td></tr>
342N/A<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_usertrack.c</td></tr></table>
3041N/A<h3>Summary</h3>
1516N/A
1636N/A <p>Provides tracking of a user through your website via browser
3041N/A cookies.</p>
3234N/A</div>
1386N/A<div id="quickview"><h3 class="directives">Directives</h3>
3234N/A<ul id="toc">
2639N/A<li><img alt="" src="/images/down.gif" /> <a href="#cookiedomain">CookieDomain</a></li>
3234N/A<li><img alt="" src="/images/down.gif" /> <a href="#cookieexpires">CookieExpires</a></li>
39N/A<li><img alt="" src="/images/down.gif" /> <a href="#cookiename">CookieName</a></li>
51N/A<li><img alt="" src="/images/down.gif" /> <a href="#cookiestyle">CookieStyle</a></li>
2073N/A<li><img alt="" src="/images/down.gif" /> <a href="#cookietracking">CookieTracking</a></li>
2910N/A</ul>
3110N/A<h3>Topics</h3>
2144N/A<ul id="topics">
1066N/A<li><img alt="" src="/images/down.gif" /> <a href="#logging">Logging</a></li>
1231N/A</ul></div>
2453N/A<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1352N/A<div class="section">
1890N/A<h2><a name="logging" id="logging">Logging</a></h2>
296N/A
2876N/A
39N/A <p><code class="module"><a href="/mod/mod_usertrack.html">mod_usertrack</a></code> sets a cookie which can be logged
3041N/A via <code class="module"><a href="/mod/mod_log_config.html">mod_log_config</a></code> configurable logging formats:</p>
3041N/A
3041N/A <div class="example"><p><code>
3041N/A LogFormat "%{Apache}n %r %t" usertrack<br />
3041N/A CustomLog logs/clickstream.log usertrack
3041N/A </code></p></div>
3041N/A
3041N/A</div>
3041N/A<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
3234N/A<div class="directive-section"><h2><a name="CookieDomain" id="CookieDomain">CookieDomain</a> <a name="cookiedomain" id="cookiedomain">Directive</a></h2>
3041N/A<table class="directive">
3041N/A<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The domain to which the tracking cookie applies</td></tr>
3041N/A<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieDomain <em>domain</em></code></td></tr>
3041N/A<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3041N/A<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
3041N/A<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
3041N/A<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
3041N/A</table>
3041N/A
3041N/A <p>This directive controls the setting of the domain to which
3041N/A the tracking cookie applies. If not present, no domain is
3041N/A included in the cookie header field.</p>
3234N/A
3041N/A <p>The domain string <strong>must</strong> begin with a dot, and
3041N/A <strong>must</strong> include at least one embedded dot. That is,
3041N/A <code>.example.com</code> is legal, but <code>www.example.com</code> and
3041N/A <code>.com</code> are not.</p>
3041N/A
3041N/A <div class="note">Most browsers in use today will not allow cookies to be set
3041N/A for a two-part top level domain, such as <code>.co.uk</code>,
3041N/A although such a domain ostensibly fulfills the requirements
2690N/A above.<br />
2690N/A
2690N/A These domains are equivalent to top level domains such as
2690N/A <code>.com</code>, and allowing such cookies may be a security
2690N/A risk. Thus, if you are under a two-part top level domain, you
2690N/A should still use your actual domain, as you would with any other top
2690N/A level domain (for example <code>.example.co.uk</code>).
2690N/A </div>
2690N/A
2690N/A <div class="example"><p><code>
2690N/A CookieDomain .example.com
2690N/A </code></p></div>
2690N/A
2690N/A</div>
2690N/A<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2690N/A<div class="directive-section"><h2><a name="CookieExpires" id="CookieExpires">CookieExpires</a> <a name="cookieexpires" id="cookieexpires">Directive</a></h2>
2690N/A<table class="directive">
2690N/A<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Expiry time for the tracking cookie</td></tr>
2690N/A<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieExpires <em>expiry-period</em></code></td></tr>
2690N/A<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2690N/A<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
2690N/A<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
2690N/A<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
2690N/A</table>
2690N/A <p>When used, this directive sets an expiry time on the cookie
2690N/A generated by the usertrack module. The <em>expiry-period</em>
2690N/A can be given either as a number of seconds, or in the format
2690N/A such as "2 weeks 3 days 7 hours". Valid denominations are:
2690N/A years, months, weeks, days, hours, minutes and seconds. If the expiry
2690N/A time is in any format other than one number indicating the
2690N/A number of seconds, it must be enclosed by double quotes.</p>
2690N/A
2690N/A <p>If this directive is not used, cookies last only for the
2690N/A current browser session.</p>
2690N/A
2690N/A <div class="example"><p><code>
2690N/A CookieExpires "3 weeks"
2690N/A </code></p></div>
1713N/A
39N/A</div>
39N/A<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
39N/A<div class="directive-section"><h2><a name="CookieName" id="CookieName">CookieName</a> <a name="cookiename" id="cookiename">Directive</a></h2>
39N/A<table class="directive">
39N/A<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the tracking cookie</td></tr>
205N/A<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieName <em>token</em></code></td></tr>
39N/A<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CookieName Apache</code></td></tr>
205N/A<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
39N/A<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
39N/A<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
39N/A<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
39N/A</table>
39N/A <p>This directive allows you to change the name of the cookie
39N/A this module uses for its tracking purposes. By default the
39N/A cookie is named "<code>Apache</code>".</p>
39N/A
39N/A <p>You must specify a valid cookie name; results are
39N/A unpredictable if you use a name containing unusual characters.
39N/A Valid characters include A-Z, a-z, 0-9, "_", and "-".</p>
39N/A
39N/A <div class="example"><p><code>
39N/A CookieName clicktrack
39N/A </code></p></div>
39N/A
39N/A</div>
39N/A<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
39N/A<div class="directive-section"><h2><a name="CookieStyle" id="CookieStyle">CookieStyle</a> <a name="cookiestyle" id="cookiestyle">Directive</a></h2>
39N/A<table class="directive">
39N/A<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Format of the cookie header field</td></tr>
39N/A<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieStyle
48N/A <em>Netscape|Cookie|Cookie2|RFC2109|RFC2965</em></code></td></tr>
48N/A<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CookieStyle Netscape</code></td></tr>
48N/A<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
48N/A<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
48N/A<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
59N/A<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
48N/A</table>
2073N/A <p>This directive controls the format of the cookie header
2073N/A field. The three formats allowed are:</p>
39N/A
2639N/A <ul>
2910N/A <li><strong>Netscape</strong>, which is the original but now deprecated
39N/A syntax. This is the default, and the syntax Apache has
567N/A historically used.</li>
838N/A
1890N/A <li><strong>Cookie</strong> or <strong>RFC2109</strong>, which is the syntax that
2608N/A superseded the Netscape syntax.</li>
3110N/A
3110N/A <li><strong>Cookie2</strong> or <strong>RFC2965</strong>, which is the most
3110N/A current cookie syntax.</li>
3110N/A </ul>
3110N/A
3110N/A <p>Not all clients can understand all of these formats, but you
39N/A should use the newest one that is generally acceptable to your
39N/A users' browsers. At the time of writing, most browsers support all
39N/A three of these formats, with <code>Cookie2</code> being the
1431N/A preferred format.</p>
3158N/A
39N/A <div class="example"><p><code>
227N/A CookieStyle Cookie2
3158N/A </code></p></div>
315N/A
39N/A</div>
1352N/A<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1352N/A<div class="directive-section"><h2><a name="CookieTracking" id="CookieTracking">CookieTracking</a> <a name="cookietracking" id="cookietracking">Directive</a></h2>
1352N/A<table class="directive">
1352N/A<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables tracking cookie</td></tr>
1431N/A<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieTracking on|off</code></td></tr>
3158N/A<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CookieTracking off</code></td></tr>
429N/A<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
315N/A<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
3158N/A<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
429N/A<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
1352N/A</table>
1352N/A <p>When <code class="module"><a href="/mod/mod_usertrack.html">mod_usertrack</a></code> is loaded, and
39N/A <code>CookieTracking on</code> is set, Apache will send a
926N/A user-tracking cookie for all new requests. This directive can
3402N/A be used to turn this behavior on or off on a per-server or
203N/A per-directory basis. By default, enabling
203N/A <code class="module"><a href="/mod/mod_usertrack.html">mod_usertrack</a></code> will <strong>not</strong>
203N/A activate cookies. </p>
203N/A
1045N/A <div class="example"><p><code>
1045N/A CookieTracking on
72N/A </code></p></div>
72N/A
59N/A
2054N/A</div>
1045N/A</div>
1045N/A<div class="bottomlang">
1045N/A<p><span>Available Languages: </span><a href="/en/mod/mod_usertrack.html" title="English">&nbsp;en&nbsp;</a></p>
1045N/A</div><div id="footer">
1713N/A<p class="apache">Copyright 2010 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
3041N/A<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>
3041N/A</body></html>