views:

368

answers:

3

We've got a site with two types of users:

  • Guests
  • Registered users

What we are looking for is a method to track both types of users within just one Google Analytics profile. We believe a registered user stays more in the site and has a higher page view count that a guest.

Could this be possible within just one profile?
Could there be a way to show custom reports in the profile page to show both user's average time and guests average time?

I know Analytics is such a powerful application, but I'm no guru and I couldn't find anything on Google.

Thanks.

Bounty Update

I know it has to do with filters. In your answer please share code and step-by-step instructions.

A: 

Hi,

Yes this is certainly possibly in GA. What you will need to do is set a custom variable on the page (for example user_type which is the default custom variable in GA already).

You can then track, pivot and analyse this data all you like via GA. See the Visitors menu in GA and the bottom of the sub-nav is the Custom Variables section.

Cheers,

Z

joesk
Thanks. Could you elaborate? I don't have much experience with analytics.
metrobalderas
+2  A: 

what you will need to do is amend the google script at the bottom of your page when it loads to show the state of this custom value.

take a look at for more info. http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html

what i think you atually want to do is more custom visitor segmentation. http://code.google.com/apis/analytics/docs/tracking/gaTrackingVisitorSegments.html

TheAlbear
+4  A: 

You can use custom variables in GA to track different types of users. Take a look at this example in the GA docs for more information. http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html#examples

This is how I would do it:

  • When the user session starts, if the user is not a registered user, set a custom variable like so:
   pageTracker._setCustomVar(
      1,             // This custom var is set to slot #1
      "User Type",   // The name of the custom varaible
      "Guest",      // Sets the value of "User Type" to "Guest" for non registered users
       2             // Sets the scope to session-level  
   );
   pageTracker._trackPageview();
  • After the user logs in, use the following code.
   pageTracker._setCustomVar(
      1,             
      "User Type",   
      "Registered User",
       2              
   );
   pageTracker._trackPageview();

Now you should be able to see User Type as a custom variable in your reports.

Hope this helps.

LightX
If you are using the asynchronous tracking script (http://code.google.com/intl/it/apis/analytics/docs/tracking/asyncTracking.html) then you have to use:_gaq.push(['_setCustomVar', 1, "User Type", "Guest", 2]);and_gaq.push(['_setCustomVar', 1, "User Type", "Registered User", 2]);before the call to _trackPageview, that in the asynchronous way is:_gaq.push(['_trackPageview']);
Nicolò Martini
@electroportal +1 for async :)
LightX