]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_usertrack.xml
Update the copyright year in all .c, .h and .xml files
[apache] / docs / manual / mod / mod_usertrack.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
7  Copyright 2002-2006 The Apache Software Foundation or its licensors, as
8  applicable.
9
10  Licensed under the Apache License, Version 2.0 (the "License");
11  you may not use this file except in compliance with the License.
12  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <modulesynopsis metafile="mod_usertrack.xml.meta">
24 <name>mod_usertrack</name>
25 <description>
26 <em>Clickstream</em> logging of user activity on a site
27 </description>
28 <status>Extension</status>
29 <sourcefile>mod_usertrack.c</sourcefile>
30 <identifier>usertrack_module</identifier>
31
32 <summary>
33     <p>Previous releases of Apache have included a module which
34     generates a 'clickstream' log of user activity on a site using
35     cookies. This was called the "cookies" module, mod_cookies. In
36     Apache 1.2 and later this module has been renamed the "user
37     tracking" module, mod_usertrack. This module has been
38     simplified and new directives added.</p>
39 </summary>
40
41
42 <section id="logging">
43 <title>Logging</title>
44
45     <p>Previously, the cookies module (now the user tracking
46     module) did its own logging, using the <directive>CookieLog</directive>
47     directive. In this release, this module does no logging at all.
48     Instead, a configurable log format file should be used to log
49     user click-streams. This is possible because the logging module
50     now allows multiple log files. The cookie itself is logged by
51     using the text <code>%{cookie}n</code> in the log file format. For
52     example:</p>
53 <example>
54 CustomLog logs/clickstream "%{cookie}n %r %t"
55 </example>
56
57     <p>For backward compatibility the configurable log module
58     implements the old <directive
59     module="mod_log_config">CookieLog</directive> directive, but this
60     should be upgraded to the above <directive
61     module="mod_log_config">CustomLog</directive> directive. </p>
62 </section>
63
64 <section id="cookiedate">
65 <title>2-digit or 4-digit dates for cookies?</title>
66
67     <p>(the following is from message
68     &lt;022701bda43d$9d32bbb0$1201a8c0@christian.office.sane.com&gt;
69     in the new-httpd archives) </p>
70 <pre>
71 From: "Christian Allen" &lt;christian@sane.com&gt;
72 Subject: Re: Apache Y2K bug in mod_usertrack.c
73 Date: Tue, 30 Jun 1998 11:41:56 -0400
74
75 Did some work with cookies and dug up some info that might be useful.
76
77 True, Netscape claims that the correct format NOW is four digit dates, and
78 four digit dates do in fact work... for Netscape 4.x (Communicator), that
79 is.  However, 3.x and below do NOT accept them.  It seems that Netscape
80 originally had a 2-digit standard, and then with all of the Y2K hype and
81 probably a few complaints, changed to a four digit date for Communicator.
82 Fortunately, 4.x also understands the 2-digit format, and so the best way to
83 ensure that your expiration date is legible to the client's browser is to
84 use 2-digit dates.
85
86 However, this does not limit expiration dates to the year 2000; if you use
87 an expiration year of "13", for example, it is interpreted as 2013, NOT
88 1913!  In fact, you can use an expiration year of up to "37", and it will be
89 understood as "2037" by both MSIE and Netscape versions 3.x and up (not sure
90 about versions previous to those).  Not sure why Netscape used that
91 particular year as its cut-off point, but my guess is that it was in respect
92 to UNIX's 2038 problem.  Netscape/MSIE 4.x seem to be able to understand
93 2-digit years beyond that, at least until "50" for sure (I think they
94 understand up until about "70", but not for sure).
95
96 Summary:  Mozilla 3.x and up understands two digit dates up until "37"
97 (2037).  Mozilla 4.x understands up until at least "50" (2050) in 2-digit
98 form, but also understands 4-digit years, which can probably reach up until
99 9999.  Your best bet for sending a long-life cookie is to send it for some
100 time late in the year "37".
101 </pre>
102
103 </section>
104
105 <directivesynopsis>
106 <name>CookieDomain</name>
107 <description>The domain to which the tracking cookie applies</description>
108 <syntax>CookieDomain <em>domain</em></syntax>
109 <contextlist>
110 <context>server config</context>
111 <context>virtual host</context>
112 <context>directory</context>
113 <context>.htaccess</context>
114 </contextlist>
115 <override>FileInfo</override>
116
117 <usage>
118
119     <p>This directive controls the setting of the domain to which
120     the tracking cookie applies. If not present, no domain is
121     included in the cookie header field.</p>
122
123     <p>The domain string <strong>must</strong> begin with a dot, and
124     <strong>must</strong> include at least one embedded dot. That is,
125     ".foo.com" is legal, but "foo.bar.com" and ".com" are not.</p>
126 </usage>
127 </directivesynopsis>
128
129
130 <directivesynopsis>
131 <name>CookieExpires</name>
132 <description>Expiry time for the tracking cookie</description>
133 <syntax>CookieExpires <em>expiry-period</em></syntax>
134 <contextlist>
135 <context>server config</context>
136 <context>virtual host</context>
137 <context>directory</context>
138 <context>.htaccess</context>
139 </contextlist>
140 <override>FileInfo</override>
141
142 <usage>
143     <p>When used, this directive sets an expiry time on the cookie
144     generated by the usertrack module. The <em>expiry-period</em>
145     can be given either as a number of seconds, or in the format
146     such as "2 weeks 3 days 7 hours". Valid denominations are:
147     years, months, weeks, days, hours, minutes and seconds. If the expiry
148     time is in any format other than one number indicating the
149     number of seconds, it must be enclosed by double quotes.</p>
150
151     <p>If this directive is not used, cookies last only for the
152     current browser session.</p>
153 </usage>
154 </directivesynopsis>
155
156 <directivesynopsis>
157 <name>CookieName</name>
158 <description>Name of the tracking cookie</description>
159 <syntax>CookieName <em>token</em></syntax>
160 <default>CookieName Apache</default>
161 <contextlist>
162 <context>server config</context>
163 <context>virtual host</context>
164 <context>directory</context>
165 <context>.htaccess</context>
166 </contextlist>
167 <override>FileInfo</override>
168
169 <usage>
170     <p>This directive allows you to change the name of the cookie
171     this module uses for its tracking purposes. By default the
172     cookie is named "<code>Apache</code>".</p>
173
174     <p>You must specify a valid cookie name; results are
175     unpredictable if you use a name containing unusual characters.
176     Valid characters include A-Z, a-z, 0-9, "_", and "-".</p>
177 </usage>
178 </directivesynopsis>
179
180 <directivesynopsis>
181 <name>CookieStyle</name>
182 <description>Format of the cookie header field</description>
183 <syntax>CookieStyle
184     <em>Netscape|Cookie|Cookie2|RFC2109|RFC2965</em></syntax>
185 <default>CookieStyle Netscape</default>
186 <contextlist>
187 <context>server config</context>
188 <context>virtual host</context>
189 <context>directory</context>
190 <context>.htaccess</context>
191 </contextlist>
192 <override>FileInfo</override>
193
194 <usage>
195     <p>This directive controls the format of the cookie header
196     field. The three formats allowed are:</p>
197
198     <ul>
199       <li><strong>Netscape</strong>, which is the original but now deprecated
200       syntax. This is the default, and the syntax Apache has
201       historically used.</li>
202
203       <li><strong>Cookie</strong> or <strong>RFC2109</strong>, which is the syntax that
204       superseded the Netscape syntax.</li>
205
206       <li><strong>Cookie2</strong> or <strong>RFC2965</strong>, which is the most
207       current cookie syntax.</li>
208     </ul>
209
210     <p>Not all clients can understand all of these formats. but you
211     should use the newest one that is generally acceptable to your
212     users' browsers.</p>
213 </usage>
214 </directivesynopsis>
215
216
217
218 <directivesynopsis>
219 <name>CookieTracking</name>
220 <description>Enables tracking cookie</description>
221 <syntax>CookieTracking on|off</syntax>
222 <default>CookieTracking off</default>
223 <contextlist>
224 <context>server config</context>
225 <context>virtual host</context>
226 <context>directory</context>
227 <context>.htaccess</context>
228 </contextlist>
229 <override>FileInfo</override>
230
231 <usage>
232     <p>When the user track module is compiled in, and
233     "CookieTracking on" is set, Apache will start sending a
234     user-tracking cookie for all new requests. This directive can
235     be used to turn this behavior on or off on a per-server or
236     per-directory basis. By default, compiling mod_usertrack will
237     not activate cookies. </p>
238
239 </usage>
240 </directivesynopsis>
241
242 </modulesynopsis>