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