2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
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.
23 <modulesynopsis metafile="mod_usertrack.xml.meta">
24 <name>mod_usertrack</name>
26 <em>Clickstream</em> logging of user activity on a site
28 <status>Extension</status>
29 <sourcefile>mod_usertrack.c</sourcefile>
30 <identifier>usertrack_module</identifier>
33 <p>Provides tracking of a user through your website via browser
38 <section id="logging">
39 <title>Logging</title>
41 <p><module>mod_usertrack</module> sets a cookie which can be logged
42 via <module>mod_log_config</module> configurable logging formats:</p>
44 <highlight language="config">
45 LogFormat "%{Apache}n %r %t" usertrack
46 CustomLog logs/clickstream.log usertrack
52 <name>CookieDomain</name>
53 <description>The domain to which the tracking cookie applies</description>
54 <syntax>CookieDomain <em>domain</em></syntax>
56 <context>server config</context>
57 <context>virtual host</context>
58 <context>directory</context>
59 <context>.htaccess</context>
61 <override>FileInfo</override>
65 <p>This directive controls the setting of the domain to which
66 the tracking cookie applies. If not present, no domain is
67 included in the cookie header field.</p>
69 <p>The domain string <strong>must</strong> begin with a dot, and
70 <strong>must</strong> include at least one embedded dot. That is,
71 <code>.example.com</code> is legal, but <code>www.example.com</code> and
72 <code>.com</code> are not.</p>
74 <note>Most browsers in use today will not allow cookies to be set
75 for a two-part top level domain, such as <code>.co.uk</code>,
76 although such a domain ostensibly fulfills the requirements
79 These domains are equivalent to top level domains such as
80 <code>.com</code>, and allowing such cookies may be a security
81 risk. Thus, if you are under a two-part top level domain, you
82 should still use your actual domain, as you would with any other top
83 level domain (for example <code>.example.co.uk</code>).
86 <highlight language="config">
87 CookieDomain .example.com
94 <name>CookieExpires</name>
95 <description>Expiry time for the tracking cookie</description>
96 <syntax>CookieExpires <em>expiry-period</em></syntax>
98 <context>server config</context>
99 <context>virtual host</context>
100 <context>directory</context>
101 <context>.htaccess</context>
103 <override>FileInfo</override>
106 <p>When used, this directive sets an expiry time on the cookie
107 generated by the usertrack module. The <em>expiry-period</em>
108 can be given either as a number of seconds, or in the format
109 such as "2 weeks 3 days 7 hours". Valid denominations are:
110 years, months, weeks, days, hours, minutes and seconds. If the expiry
111 time is in any format other than one number indicating the
112 number of seconds, it must be enclosed by double quotes.</p>
114 <p>If this directive is not used, cookies last only for the
115 current browser session.</p>
117 <highlight language="config">
118 CookieExpires "3 weeks"
124 <name>CookieName</name>
125 <description>Name of the tracking cookie</description>
126 <syntax>CookieName <em>token</em></syntax>
127 <default>CookieName Apache</default>
129 <context>server config</context>
130 <context>virtual host</context>
131 <context>directory</context>
132 <context>.htaccess</context>
134 <override>FileInfo</override>
137 <p>This directive allows you to change the name of the cookie
138 this module uses for its tracking purposes. By default the
139 cookie is named "<code>Apache</code>".</p>
141 <p>You must specify a valid cookie name; results are
142 unpredictable if you use a name containing unusual characters.
143 Valid characters include A-Z, a-z, 0-9, "_", and "-".</p>
145 <highlight language="config">
146 CookieName clicktrack
153 <name>CookieStyle</name>
154 <description>Format of the cookie header field</description>
156 <em>Netscape|Cookie|Cookie2|RFC2109|RFC2965</em></syntax>
157 <default>CookieStyle Netscape</default>
159 <context>server config</context>
160 <context>virtual host</context>
161 <context>directory</context>
162 <context>.htaccess</context>
164 <override>FileInfo</override>
167 <p>This directive controls the format of the cookie header
168 field. The three formats allowed are:</p>
171 <li><strong>Netscape</strong>, which is the original but now deprecated
172 syntax. This is the default, and the syntax Apache has
173 historically used.</li>
175 <li><strong>Cookie</strong> or <strong>RFC2109</strong>, which is the syntax that
176 superseded the Netscape syntax.</li>
178 <li><strong>Cookie2</strong> or <strong>RFC2965</strong>, which is the most
179 current cookie syntax.</li>
182 <p>Not all clients can understand all of these formats, but you
183 should use the newest one that is generally acceptable to your
184 users' browsers. At the time of writing, most browsers support all
185 three of these formats, with <code>Cookie2</code> being the
186 preferred format.</p>
188 <highlight language="config">
197 <name>CookieTracking</name>
198 <description>Enables tracking cookie</description>
199 <syntax>CookieTracking on|off</syntax>
200 <default>CookieTracking off</default>
202 <context>server config</context>
203 <context>virtual host</context>
204 <context>directory</context>
205 <context>.htaccess</context>
207 <override>FileInfo</override>
210 <p>When <module>mod_usertrack</module> is loaded, and
211 <code>CookieTracking on</code> is set, Apache will send a
212 user-tracking cookie for all new requests. This directive can
213 be used to turn this behavior on or off on a per-server or
214 per-directory basis. By default, enabling
215 <module>mod_usertrack</module> will <strong>not</strong>
216 activate cookies. </p>
218 <highlight language="config">