Segmenting Members from Non-Members
August 29, 2007 by Justin CutroniDo 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:

Now, here are the same metrics with members removed:

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:

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.
Subscribe:










18 Responses to “Segmenting Members from Non-Members”
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
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
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
Nice post my friend.
Welcome back! :)
-Avinash.
By Avinash Kaushik on Aug 30, 2007
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
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
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
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
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
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
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
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
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
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
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
Hey Justin. Great post, I’m working on an implementation and this is great info.
By Jeremy on Jan 28, 2008