Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tracking two different user types with Google Analytics?

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.

like image 666
metrobalderas Avatar asked Feb 12 '10 06:02

metrobalderas


People also ask

Can you track specific users in Google Analytics?

While many marketers believe it's out of the question to track individual users in Google Analytics, it's not impossible. If your application or website has a login authentication system, then it is possible to track users in Google Analytics with it's User ID tracking feature.

Can one website have 2 Google Analytics accounts?

If you are using Analytics to track a single website, account organization is simple: you will have one account for your website. For setting up Analytics accounts to manage multiple websites, keep in mind the following: Each Analytics account can have up to 100 properties and each property can have up to 25 views.

How Google Analytics count unique users?

Google Analytics counts users by generating a random string for the Client ID field, which gets stored within a user's browser cookie. However, different users aren't necessarily unique visitors. Keep reading to learn why Google Analytics can't technically identify individual users.

Can I Track 2 websites on Google Analytics?

When you have multiple websites to track, you can use a single account to add multiple sites in Google Analytics, which can be done in two ways. You can either add all your sites under a single Analytics account as different properties or add a unique Analytics account ID to each individual site.


2 Answers

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.

like image 77
madaboutcode Avatar answered Sep 30 '22 20:09

madaboutcode


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

like image 22
TheAlbear Avatar answered Sep 30 '22 20:09

TheAlbear