Forum Moderators: DixonJones

Message Too Old, No Replies

mod_usertrack

I'm tring to enable clickstream logging.

         

keithxl

12:57 am on Dec 21, 2005 (gmt 0)

10+ Year Member



I'm tring to enable clickstream logging using mod_usertrack. I've checked the http.conf file and have made sure the module is loaded when httpd starts. Here's that line:

LoadModule usertrack_module modules/mod_usertrack.so

Where do I go from here? Is there another configuration file I need to enable or edit? Thanks all.

Keith

larryn

3:25 pm on Dec 21, 2005 (gmt 0)

10+ Year Member



Keith,

You need to make some changes to your httpd.conf to record the tracking cookie:


<VirtualHost ..*..>
CustomLog /clients/visitour/docs/logs/visitour.referer_log
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}n\""
CookieTracking On
CookieExpires "35 days"
</VirtualHost>

The last bit records the session ID in your log file for analysis, otherwise the session cookie isn't available. You might also want to look into using cronolog to automatically enable log rotation:

CustomLog ¦/usr/bin/cronolog.exe /clients/visitour/docs/logs/%Y.%m.%d.access.log
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}n\"

I use mod_usertrack on all my sites, so feel free to ask any other questions,

Larry

keithxl

6:43 pm on Dec 21, 2005 (gmt 0)

10+ Year Member



Thanks Larry,

I got a failure message after I made my entry and tried to start httpd.

This is what I put in httpd.conf:

<VirtualHost 10.0.0.14>
CustomLog /clients/visitour/docs/logs/visitour.referer_log
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}n\""
CookieTracking On
CookieExpires "35 days"
</VirtualHost>

Here is the failure message:

Starting httpd: Syntax error on line 1039 of /etc/httpd/conf/httpd.conf:
CustomLog takes two or three arguments, a file name, a custom log format string
or format name, and an optional "env=" clause (see docs)
[FAILED]

keithxl

11:39 pm on Dec 21, 2005 (gmt 0)

10+ Year Member



Sorry Larry,

Nevermind. I figured out the arguments were on the line after the CustomLog.

However, I can't seem to find the log. Your configuration has it going to:

/clients/visitour/docs/logs/visitour.referer_log

Also, is the virtual host section the only section in the httpd.conf file I can insert the CustomLog configuration?

Keith

larryn

12:55 am on Dec 22, 2005 (gmt 0)

10+ Year Member



Keith,

You need to edit the file location I pasted from my server to where you want the files on your server.

So replace the:

clients/visitour/docs/logs/visitour.referer_log
with the appropriate location on your specific box.

Glad to have helped, feel free if you have any other issues...

Larry