Segmenting Members from Non-Members

August 29, 2007 by Justin Cutroni

Do you run a subscription based website? You know the type of site: customers pay you a monthly fee and you give them access to valuable content. I’ve worked with a number of clients with this business model and have noticed that many make a consistent mistake when setting up their analytics package: they fail to segment people who subscribe to the website (i.e. members) from those who do not.

Why is this so important? Here’s an example. The following image shows some real data that is not segmented other than the removal of internal employees:

Non-Segmented data

Now, here are the same metrics with members removed:

Segmented Metrics

Big difference, huh? Just image how this changes all those metrics that are calculated using Visits, like conversion rate, abandonment rate, etc.!

It doesn’t matter what analytics tool you use. If your website has some type of member’s area you need to segment out members to get an accurate view of your website performance and online marketing activities.

The Google Analytics Way

If you’re using Google Analytics the implementation is simple. Use GA’s custom segmentation feature to identify and segment members. Remember, the custom segmentation features uses a JavaScript function, __utmSetVar(), to set a cookie, named __utmv, on the visitor’s machine. The cookie is a persistent cookie and lasts for 6 months. You need to call __utmSetVar() when a member identifies herself. You can put it on a ‘thanks for logging in’. Here’s a perfectly good implementation of the code:


<script type="text/javascript">
__utmSetVar('member');
</script>

Remember, the above code snippet should appear AFTER the standard Google Analytics tracking code. The reason is that the __utmSetVar() function is in the urchin.js file. So if you try to call __utmSetVar() before the urchin.js is loaded by the browser then the visitor will receive an error.

Once the cookie has been set on the visitor’s machine you can use the custom segment value to exclude them from a profile. The exclude filter would look something like this:

GA Filter to exclude members

Any profile that has this filter will only show data for those visitors that are not members thus providing a more accurate view of how effective the website is at converting visitors.

And let’s not forget about the members. You can create a profile that only includes members (the filter settings are almost identical to the filter above, just change the filter type from ‘exclude’ to ‘include’). By creating a profile specifically for members you can focus on their usage of the member’s area. For example, the Top Content report will identify the content that they find most engaging. You could also use some of the loyalty reports to see how often they use the website.

Tip: Tracking Different Subscription Levels

If your membership model has various level, like Gold, Silver and Bronze, you can include this information in the custom segment value. This allows for a more detailed analysis of each membership level. Just modify the value you pass to the __utmSetVar() function. For example:


<script type="text/javascript">
__utmSetVar('member-gold');
</script>

or


<script type="text/javascript">
__utmSetVar('member-silver');
</script>

or


<script type="text/javascript">
__utmSetVar('member-bronze');
</script>

After the custom segment cookie has been set you can create different profiles for each subscription level. Use the filter shown above, just change the value for Filter Field to match one of the values in the code above. Then you can use the profiles to analyze the member data and observe their habits.

Share:
  • Digg
  • Technorati
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
  • Facebook
  • SphereIt
  • TwitThis
  • Yahoo! Buzz
Subscribe:
  1. 31 Responses to “Segmenting Members from Non-Members”

  2. Does the __utmSetVar(’member’) code need to be printed throughout the visit of the logged in user (in each page) or only once in the login_success page?

    Thanks!

    By Roy on Aug 30, 2007

  3. Hi Roy,

    Great question. No. you do not need __utmSetVar() on every page. Once that function executes it sets a cookie on the visitor’s machine. The cookie will persist and every action that the visitor performs is attributed to the value in the cookie.

    Thanks for reading,

    Justin

    By Justin on Aug 30, 2007

  4. Will the cookie persist across sessions and remain valid for future visits?

    Also, if you want to see activity for both members and non-members, that means you will need to set up two profiles in Google Analytics and include two sets of the Google tracking code on every page, correct?

    By Jon on Aug 30, 2007

  5. Nice post my friend.

    Welcome back! :)

    -Avinash.

    By Avinash Kaushik on Aug 30, 2007

  6. I have been experimenting with this approach in pretty much the same context and came to the following conclusion: once a visitor has been identified as part of a segment, it is not possible to change this segment within the visitor’s session.

    So let’s say a visitor upgrades its membership from ‘member-bronze’ to ‘member-silver’. To reflect that upgrade, the segment should be changed using __utmSetVar(). From my experience, GA will only show the first assigned segment.

    Can you confirm that?

    Thank you

    By Paul on Aug 30, 2007

  7. Hi Jon,

    Yes, the cookie will persist for 6 months.

    To see the activities of members and non members you only need one profile. Remember, only the members will have a custom segment value. So the User Defined report will identify customers (who will have a custom segment value of ‘customer’) and non-customers (who will be in a line item named ‘not set’).

    Hope that helps.

    Justin

    By Justin on Aug 30, 2007

  8. Avinash -

    Thanks! It’s good to be back. I wish I could say that I was enjoying lots of free time, but I can’t. I’ve got some fun posts coming in the next week. :)

    Paul -

    The way that GA ‘moves’ a visitor from one segment to another is a bit unique. If a visitor is not assigned to a segment, i.e. they have a value of ‘(no set)’, and then you put them in a segment, then the visitor’s current visit, and all subsequent visits, are moved to the new segment value.

    However, if the visitor is already in a segment, and then you change that segment, then the FOLLOWING visit, and all visits after that one, will be moved into the new segment.

    I know what you’re thinking, that this is a bit crazy and will ruin the quality of the data. It doesn’t help, but given the state of data quality it’s impact is negligible.

    I hope that makes sense.

    By Justin on Aug 30, 2007

  9. Justin,

    I owe you a HUGE thank you for this post. Just finished in 5 min what i was expecting to spend an hour on.

    By Zigzo on Sep 11, 2007

  10. Hello,
    I am curious whether there is a method to set a cookie using Google analytics that tracks PPC visitors up to 90-days?

    By Bryan on Sep 17, 2007

  11. Hi Bryan,

    By default, GA will set a cookie (named __utmz) that tracks all referral information, this includes PPC traffic. For this to work you must tag your PPC links.

    The tracking cookie will persist for 6 months. If you would like to change the timeout value you can add the following line to your tracking code:

    var _ucto=”7776000″;

    That set’s the timeout of the tracking cookies to 90 days and not 6 months.

    Hope that helps,

    Justin

    By Justin on Sep 18, 2007

  12. Justin,

    Thanks for the great information on how GA handles segmentation.

    I also have an issue where occassionaly I might want to track my users in one segment for part of the visit and in another segment for part of the visit. I understand that if you change the segment it will not start tracking to that segment until the following visit.

    My question is how does GA define “following visit”? Does the browser need to be closed or is there a timeout value that GA uses? I’m guessing that after some amount of inactive time (30 minutes?) that GA will consider the next access to the site to be a new visit. Am I close to understanding this correctly?

    By David on Sep 19, 2007

  13. Hi David,

    You’re right on the money. A visit ends when the browser closes or after 30minutes of inactivity.

    Thanks for the question and thanks for reading.

    Justin

    By Justin on Sep 26, 2007

  14. Excellent post, this is exactly the type of information I am looking to learn with Google Analytics. I also just added your feed to my reader. Thanks!

    By BJ Wright on Oct 4, 2007

  15. Hi Justin,

    “If your membership model has various level (…) just modify the value you pass to the _utmSetVar() function”

    How do I “just” do that? Where do I define which value will be passed to the function?

    Thanks.

    By Daniel Waisberg on Jan 15, 2008

  16. Hi Daniel,

    You need to add some server level code that puts the membership level in the utmSetVar() function. Usually the membership level is stored in the database. When you check the visitor’s credentials in the DB you can also extract the membership level.

    Hope that helps and thanks for reading!

    Justin

    By Justin Cutroni on Jan 20, 2008

  17. Hey Justin. Great post, I’m working on an implementation and this is great info.

    By Jeremy on Jan 28, 2008

  18. So what if you have a drop down with like 20 values such as ‘Industry’. Each would be a unique value. So I’m guessing the only way to handle this would be to create 20 profiles?!? There has to be an easier way right?

    By Jim on Aug 29, 2008

  19. Hi Jim,

    If your drop down has 20 items, then you’ll create 20 custom segments. You should see each of your segments in the User Defined report.

    This post was to really show how to separate smaller segments, like a group of members, from the larger population.

    If you have 20 custom segments you can create a profile for each, but you may want to wait until you start to develop some questions on their behavior.

    The one thing to keep in mind is you can never create a profile for historical data. So, if you have any questions that you want to answer about a particular segment you may want to create that profile up front and then delete when it is deemed useless.

    Thanks for the question,

    Justin

    By Justin Cutroni on Sep 2, 2008

  20. Justin, thanks for such a great resource. This article was a huge time saver in helping to implement GA.

    We have a site with registered users and many different segments. We were planning on creating one long string with user type, account level, gender, age, sport, discipline then parsing with different profiles to create our desired segments. I Have a couple questions regarding problems this may cause …

    1) Is there a character limit on the length of the variable? An example might look like Athlete : Premium : Male : 18 : Skateboard : Halfpipe

    2) Is there a limit to the number of entries in the User Defined Value table? The number of values we have will presumably equal the total number of members we have (which is currently about 350k and growing fast).

    Thanks so much!
    RJ

    By RJ on Sep 5, 2008

  21. Hi RJ,

    I’m not sure if there is a limit on the number of characters. That’s a great question. But I would suggest keeping it relatively short so it’s easy to manage the data.

    As for a limit to the amount of data that GA will collect; I know that it will only collect 50k unique URLs per day due to a database limit. I would assume that the same limit also applies to the number of unique custom segments.

    Glad you found the post helpful,

    Justin

    By Justin Cutroni on Sep 8, 2008

  22. So using RJ’s solution, one could track many segments and create the right filter (or custom segmentation) to report on one or more custom segmentation (like what Athlete AND male) are doing on your site?

    Thanks

    By Martin on Mar 3, 2009

  23. Hey Martin,

    I haven’t tried it, but it should work.

    Thanks RJ for posting that idea.

    Justin

    By Justin Cutroni on Mar 12, 2009

  24. Is there any harm in including the var on every page? Or must you only include it on the first page of the visit?

    By David on Mar 16, 2009

  25. Hi David,

    You can put it on every page, just make sure it’s setting the same value.

    Thanks for the question,

    Justin

    By Justin Cutroni on Mar 18, 2009

  26. What happens if someone upgrades midway through their session?

    ie:

    1. comes to site
    2. logs in (var = usertype1)
    3. user upgrades (var = usertype2)

    By David on Mar 18, 2009

  27. David,

    In the scenario that you describe, and assuming that the visitor does not have a custom segment value,, the current visit will get attributed to the first value (usertype1) and the following visit will be recorded as usertype2.

    Your best bet is to set the custom segment once and not change it.

    Hope that helps.

    Justin

    By Justin Cutroni on Mar 19, 2009

  28. Thanks to RJ and Justin for the previous posts - they were helpful.

    We are interested in using GA to track the usage of our web app (in ASP) by customers (i.e. companies) and the individual end users of our customers. The number of customers is currently under 10, and the total number of end users is currently under 20 – but we hope to grow to 25 customers, and 250 end users within a couple years. ;->

    We want to measure activity at a customer level (therefore an aggregate of all the end users of a given customer), as well as at a single end user level.

    Basically, we are interested in segmenting based on company ID and user ID.

    Would you suggest advanced segmentation to achieve the above?

    E.g.

    “Customer 1 : Joe Pilgrim”
    “Customer 1: Sara Jones”
    “Customer 1: Sam Smith”
    “Customer 2: Wally Wales”
    “Customer 2: Jim Bryant”

    By Giovanni Gulino on Mar 31, 2009

  29. Giovanni,

    Sure, you can do it that way. But remember, it is against the GA TOS to track personally identifiable information in Google Analytics. Google will come after you if they find info in your account.

    Thanks for the question,

    Justin

    By Justin Cutroni on Apr 16, 2009

  1. 3 Trackback(s)

  2. Sep 4, 2007: User First Web » links for 2007-09-04
  3. Sep 20, 2007: links for 2007-09-20 « PaxoBlog
  4. Oct 22, 2008: Customise your Google Analytics to Answer unique Business Questions | Digital Fire

Post a Comment