]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_usertrack.html.en
`build check-ja` :-)
[apache] / docs / manual / mod / mod_usertrack.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>mod_usertrack - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body>
14 <div id="page-header">
15 <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>
16 <p class="apache">Apache HTTP Server Version 2.1</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
19 <div id="path">
20 <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-project/">Documentation</a> &gt; <a href="../">Version 2.1</a> &gt; <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_usertrack</h1>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../en/mod/mod_usertrack.html" title="English">&nbsp;en&nbsp;</a></p>
25 </div>
26 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>
27 <em>Clickstream</em> logging of user activity on a site
28 </td></tr>
29 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
30 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>usertrack_module</td></tr>
31 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_usertrack.c</td></tr></table>
32 <h3>Summary</h3>
33
34     <p>Previous releases of Apache have included a module which
35     generates a 'clickstream' log of user activity on a site using
36     cookies. This was called the "cookies" module, mod_cookies. In
37     Apache 1.2 and later this module has been renamed the "user
38     tracking" module, mod_usertrack. This module has been
39     simplified and new directives added.</p>
40 </div>
41 <div id="quickview"><h3 class="directives">Directives</h3>
42 <ul id="toc">
43 <li><img alt="" src="../images/down.gif" /> <a href="#cookiedomain">CookieDomain</a></li>
44 <li><img alt="" src="../images/down.gif" /> <a href="#cookieexpires">CookieExpires</a></li>
45 <li><img alt="" src="../images/down.gif" /> <a href="#cookiename">CookieName</a></li>
46 <li><img alt="" src="../images/down.gif" /> <a href="#cookiestyle">CookieStyle</a></li>
47 <li><img alt="" src="../images/down.gif" /> <a href="#cookietracking">CookieTracking</a></li>
48 </ul>
49 <h3>Topics</h3>
50 <ul id="topics">
51 <li><img alt="" src="../images/down.gif" /> <a href="#logging">Logging</a></li>
52 <li><img alt="" src="../images/down.gif" /> <a href="#cookiedate">2-digit or 4-digit dates for cookies?</a></li>
53 </ul></div>
54 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
55 <div class="section">
56 <h2><a name="logging" id="logging">Logging</a></h2>
57
58
59     <p>Previously, the cookies module (now the user tracking
60     module) did its own logging, using the <code class="directive">CookieLog</code>
61     directive. In this release, this module does no logging at all.
62     Instead, a configurable log format file should be used to log
63     user click-streams. This is possible because the logging module
64     now allows multiple log files. The cookie itself is logged by
65     using the text <code>%{cookie}n</code> in the log file format. For
66     example:</p>
67 <div class="example"><p><code>
68 CustomLog logs/clickstream "%{cookie}n %r %t"
69 </code></p></div>
70
71     <p>For backward compatibility the configurable log module
72     implements the old <code class="directive"><a href="../mod/mod_log_config.html#cookielog">CookieLog</a></code> directive, but this
73     should be upgraded to the above <code class="directive"><a href="../mod/mod_log_config.html#customlog">CustomLog</a></code> directive. </p>
74 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
75 <div class="section">
76 <h2><a name="cookiedate" id="cookiedate">2-digit or 4-digit dates for cookies?</a></h2>
77
78
79     <p>(the following is from message
80     &lt;022701bda43d$9d32bbb0$1201a8c0@christian.office.sane.com&gt;
81     in the new-httpd archives) </p>
82 <pre>
83 From: "Christian Allen" &lt;christian@sane.com&gt;
84 Subject: Re: Apache Y2K bug in mod_usertrack.c
85 Date: Tue, 30 Jun 1998 11:41:56 -0400
86
87 Did some work with cookies and dug up some info that might be useful.
88
89 True, Netscape claims that the correct format NOW is four digit dates, and
90 four digit dates do in fact work... for Netscape 4.x (Communicator), that
91 is.  However, 3.x and below do NOT accept them.  It seems that Netscape
92 originally had a 2-digit standard, and then with all of the Y2K hype and
93 probably a few complaints, changed to a four digit date for Communicator.
94 Fortunately, 4.x also understands the 2-digit format, and so the best way to
95 ensure that your expiration date is legible to the client's browser is to
96 use 2-digit dates.
97
98 However, this does not limit expiration dates to the year 2000; if you use
99 an expiration year of "13", for example, it is interpreted as 2013, NOT
100 1913!  In fact, you can use an expiration year of up to "37", and it will be
101 understood as "2037" by both MSIE and Netscape versions 3.x and up (not sure
102 about versions previous to those).  Not sure why Netscape used that
103 particular year as its cut-off point, but my guess is that it was in respect
104 to UNIX's 2038 problem.  Netscape/MSIE 4.x seem to be able to understand
105 2-digit years beyond that, at least until "50" for sure (I think they
106 understand up until about "70", but not for sure).
107
108 Summary:  Mozilla 3.x and up understands two digit dates up until "37"
109 (2037).  Mozilla 4.x understands up until at least "50" (2050) in 2-digit
110 form, but also understands 4-digit years, which can probably reach up until
111 9999.  Your best bet for sending a long-life cookie is to send it for some
112 time late in the year "37".
113 </pre>
114
115 </div>
116 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
117 <div class="directive-section"><h2><a name="CookieDomain" id="CookieDomain">CookieDomain</a> <a name="cookiedomain" id="cookiedomain">Directive</a></h2>
118 <table class="directive">
119 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The domain to which the tracking cookie applies</td></tr>
120 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieDomain <em>domain</em></code></td></tr>
121 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
122 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
123 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
124 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
125 </table>
126
127     <p>This directive controls the setting of the domain to which
128     the tracking cookie applies. If not present, no domain is
129     included in the cookie header field.</p>
130
131     <p>The domain string <strong>must</strong> begin with a dot, and
132     <strong>must</strong> include at least one embedded dot. That is,
133     ".foo.com" is legal, but "foo.bar.com" and ".com" are not.</p>
134
135 </div>
136 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
137 <div class="directive-section"><h2><a name="CookieExpires" id="CookieExpires">CookieExpires</a> <a name="cookieexpires" id="cookieexpires">Directive</a></h2>
138 <table class="directive">
139 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Expiry time for the tracking cookie</td></tr>
140 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieExpires <em>expiry-period</em></code></td></tr>
141 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
142 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
143 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
144 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
145 </table>
146     <p>When used, this directive sets an expiry time on the cookie
147     generated by the usertrack module. The <em>expiry-period</em>
148     can be given either as a number of seconds, or in the format
149     such as "2 weeks 3 days 7 hours". Valid denominations are:
150     years, months, weeks, days, hours, minutes and seconds. If the expiry
151     time is in any format other than one number indicating the
152     number of seconds, it must be enclosed by double quotes.</p>
153
154     <p>If this directive is not used, cookies last only for the
155     current browser session.</p>
156
157 </div>
158 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
159 <div class="directive-section"><h2><a name="CookieName" id="CookieName">CookieName</a> <a name="cookiename" id="cookiename">Directive</a></h2>
160 <table class="directive">
161 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the tracking cookie</td></tr>
162 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieName <em>token</em></code></td></tr>
163 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CookieName Apache</code></td></tr>
164 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
165 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
166 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
167 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
168 </table>
169     <p>This directive allows you to change the name of the cookie
170     this module uses for its tracking purposes. By default the
171     cookie is named "<code>Apache</code>".</p>
172
173     <p>You must specify a valid cookie name; results are
174     unpredictable if you use a name containing unusual characters.
175     Valid characters include A-Z, a-z, 0-9, "_", and "-".</p>
176
177 </div>
178 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
179 <div class="directive-section"><h2><a name="CookieStyle" id="CookieStyle">CookieStyle</a> <a name="cookiestyle" id="cookiestyle">Directive</a></h2>
180 <table class="directive">
181 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Format of the cookie header field</td></tr>
182 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieStyle
183     <em>Netscape|Cookie|Cookie2|RFC2109|RFC2965</em></code></td></tr>
184 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CookieStyle Netscape</code></td></tr>
185 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
186 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
187 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
188 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
189 </table>
190     <p>This directive controls the format of the cookie header
191     field. The three formats allowed are:</p>
192
193     <ul>
194       <li><strong>Netscape</strong>, which is the original but now deprecated
195       syntax. This is the default, and the syntax Apache has
196       historically used.</li>
197
198       <li><strong>Cookie</strong> or <strong>RFC2109</strong>, which is the syntax that
199       superseded the Netscape syntax.</li>
200
201       <li><strong>Cookie2</strong> or <strong>RFC2965</strong>, which is the most
202       current cookie syntax.</li>
203     </ul>
204
205     <p>Not all clients can understand all of these formats. but you
206     should use the newest one that is generally acceptable to your
207     users' browsers.</p>
208
209 </div>
210 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
211 <div class="directive-section"><h2><a name="CookieTracking" id="CookieTracking">CookieTracking</a> <a name="cookietracking" id="cookietracking">Directive</a></h2>
212 <table class="directive">
213 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables tracking cookie</td></tr>
214 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CookieTracking on|off</code></td></tr>
215 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CookieTracking off</code></td></tr>
216 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
217 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
218 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
219 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_usertrack</td></tr>
220 </table>
221     <p>When the user track module is compiled in, and
222     "CookieTracking on" is set, Apache will start sending a
223     user-tracking cookie for all new requests. This directive can
224     be used to turn this behavior on or off on a per-server or
225     per-directory basis. By default, compiling mod_usertrack will
226     not activate cookies. </p>
227
228
229 </div>
230 </div>
231 <div class="bottomlang">
232 <p><span>Available Languages: </span><a href="../en/mod/mod_usertrack.html" title="English">&nbsp;en&nbsp;</a></p>
233 </div><div id="footer">
234 <p class="apache">Copyright 1999-2004 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>
235 <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>
236 </body></html>