We have an internal WordPress site, and about 25 users. Our current Google analytics set-up will show us how many times a page has been visited, but because everyone comes from the same IP address it thinks that it is basically one very industrious person clicking a lot.
Does anyone have a strategy for tracking individual users?
(They are all logged into WordPress as a function of our single sign on.)
You can use the _setCustomVar method from the JavaScript API to provide the user name of the current user. To my knowledge no GA plugins for Wordpress support this, so you will need to put your tracking code directly into the theme or write a custom plugin for it. The custom variable will then show up as a segment in Google Analytics. To get the current user you can use the wp_get_current_user API call.
Your tracking code would then look something like this:
For the Universal Analytics version:
I co-authored called Stream that tracks logged-in user activity. Basically, it's designed to be a detailed audit trail of everything that happens in the WP Admin area.
It also organizes the activity by user, context, action and IP address so it can be easily filtered/searched later.
More information: