Forum Moderators: DixonJones

Message Too Old, No Replies

Session Tracking with Cookie on Server not on page

How to do it if you only have FTP access to the server?

         

zgb999

8:34 am on Jun 25, 2004 (gmt 0)

10+ Year Member



There are easy ways around from Webtrends and others to install a plug-in on the server which places a cookie for every visitor.

Is there any way to add a cookie (to be used for session tracking) on the server if you only have FTP access to a site?

bakedjake

12:06 pm on Jun 25, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You can do it from any server-side language, such as ASP or PHP.

zgb999

4:58 pm on Jun 25, 2004 (gmt 0)

10+ Year Member



Thank you for the feedback!

Is there a way to get a cookie on all pages of a site without adding any code in it?

The plug-in solution is good because it means that you don't have to add any code on any of the existing pages but can track the visitors anyhow.

Or if I did not understand you correctly how do I implement asp or php code to be used on all pages without changing the code of those pages?

larryn

8:28 pm on Jun 25, 2004 (gmt 0)

10+ Year Member



If you are using Apache, and mod_user_track is loaded, you can enable user cookies with the following addition to your configuration file:

<VirtualHost x.x.x.x>
CustomLog logplus "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}n\""
CookieTracking On
CookieExpires "35 days"
</VirtualHost>

This will enable the default cookie, and the CustomLog directive adds that info the the log file after the browser signature.

I'm not aware of any built-in support like this for IIS unless you resort to a plug-in.

bakedjake

12:42 am on Jun 29, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Naw, you can do session cookies in global.asa on IIS.

zgb999, you may want to ask over in the Microsoft or PHP forums for specific implementation examples.

acidophil

2:43 pm on Jul 7, 2004 (gmt 0)



and how do i activate cookietracking on apache if i can't mod. the config?
is it possible to use htaccess?

thx

larryn

3:37 pm on Jul 12, 2004 (gmt 0)

10+ Year Member



Depending upon how the server is configured, most of the commands to enable cookie tracking can be put into .htaccess -- check [httpd.apache.org ] for info; however the changes to the log format are not allowed in htaccess [httpd.apache.org ], so that might limit your options.