Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Google Analytics to Track User Session

Tags:

I have a PHP (5+) based website.

I want to track registered users of my site using Google Analytics. I basically just wish to grab their session id (or some way to identify each specific user)and view their movements and site usage from my Google Analytics dashboard.

Can this be done? If so, any guidance would be most welcome.

like image 801
user277813 Avatar asked Mar 11 '10 11:03

user277813


1 Answers

I believe the best way to do this is via a custom variable: _setCustomVar(index, name, value, opt_scope)

It would be up to you to identify the 'value' as a unique session id for the user. The scope in your case would be either session(2) or visitor(1) depending on how you want to track it. http://code.google.com/intl/en/apis/analytics/docs/tracking/gaTrackingCustomVariables.html#setup

like image 164
chris.f.jones Avatar answered Oct 04 '22 15:10

chris.f.jones