Articles in The 'custom-segmentation' Tag


June 26 2009

What is the “User Defined” report, and how do I use it?

by MoreVisibility

User-Defined ReportHave you ever been in the Visitors section of your favorite Google Analytics profile and wondered what the heck “User-Defined” was? Did you ever want to know how you could make use of it? Do you have any idea what I’m talking about today? If you answered “Yes” to any of the three questions I just asked, continue reading.

Along with powerful features like Advanced Segmentation and Custom Reporting, Google Analytics allows the option for website owners to add an additional label to visitors who reach a certain point or complete a certain action on a website, such as visiting a key website page or purchasing something from a merchant’s online store. These labels are usually known as Custom Segments (or Custom Segmentation), and it’s a very powerful tool in obtaining deeper insights into website visitors who perform specific tasks and accomplish specific actions.

Making use of the User-Defined report in Google Analytics requires a bit of extra coding help from your IT department or webmaster, but it’s totally worth the short amount of time it takes to implement. For example, let’s say that I wanted to add a label of “customers” to any visitor who reaches my shopping cart’s “Thank You” confirmation / receipt page. What I would do is add an additional line of code to my Google Analytics Tracking Code (GATC), which would look exactly like this:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-XXXXXXX-1");
pageTracker._trackPageview();
pageTracker._setVar("customers");
} catch(err) {}</script>

Notice the line in bold that includes _setVar – when this is present on a page within the Google Analytics Tracking Code, an additional cookie – the __utmv cookie – gets set on a visitor’s computer, with its sole purpose being to identify the visitor by the label (or value) that you used in the code. If you notice up above, you will see “customers“, which was the label that I wanted to use.

Now, on their next visit to the site, they will be identified as a part of the “customers” segment in the User-Defined report, allowing you to perform analysis on all visitors who have purchased something from your online store. Neat, huh?

You can also use the pageTracker._setVar function when someone clicks on an important link on your site, or makes a key selection on an important form that you want visitors to fill out. For example, if you wanted to add a custom label to any visitor who clicks on your “Live Help” applet, you can ask your IT department or webmaster to add an “onClick” event, and give them the following line of code:

onClick="pageTracker._setVar('Needs Help');"

When all of your coding is complete, check the User-Defined report after about a day or so and you should see something like this:

Example of the User-Defined Report

Some things to note about Custom Segmentation / the User-Defined Report:

1. As we talked about, when a person visits a page calling the _setVar function, the __utmv cookie is set on their computer. This is a persistent, first-party cookie that has a lifetime of two years. This means that every time a user with a __utmv cookie returns to your site, the label assigned to the user will continue to identify them as such until they either delete the cookie or visit another page with another call to _setVar with a different label.

2. The purpose behind something like a User-Defined report – and Custom Segmentation in general – is that it is not designed to be updated very often. This label, for the most part, should be a permanent one for a visitor. You should only use _setVar on pages like a receipt page of a shopping cart, or an account registration “success” page for a visitor who becomes a member of your site. You shouldn’t use _setVar on your homepage, or use several different _setVar’s with different labels scattered across many pages of your website.

3. Google Analytics – at this time – only has the capacity to store one custom segment at any one time for one website. So if you are using multiple calls to _setVar on your site, Google Analytics can only store the latest value that a visitor runs into in the __utmv cookie.

4. However, Google Analytics uses what they call the “first association” of the session for visitor session calculations. So if you are using multiple calls to _setVar on your site, be aware that if a user runs into the first one, and then runs into the second one in the same visit, their Goal Conversion and Pages per Visit metrics would be attributed to the label of the first encounter with _setVar.

5. For page view calculations, Google Analytics uses the most recently defined value. So if a person runs into the second instance of _setVar on your site, all of their pageviews afterwards – including the current pageview – will be attributed to the second _setVar’s label, even though as we just learned in #4 above, visitor session information is attributed to the first encounter of _setVar.

A full, technical explanation of _setVar can be found here.

November 11 2008

Three of my favorite Advanced Segments with Google Analytics

by MoreVisibility

Ever since Google Analytics officially released Advanced Segmentation about a month ago, I haven’t been able to stop using it. How can you blame me? It’s awesome to slice and dice data in ways I could never have sliced and diced data before – and the things that I can learn about my website’s data are invaluable.

Here are three of my favorite advanced segments (so far) with Google Analytics. In parenthesis below, I outline what each segment means. The first segment is a default segment; while the second and third segments are custom advanced segments (The names of the second and third advanced segments are also “custom”):

1. Visits with Conversions / Visits with Transactions
(All Visits that have converted / made a transaction at some point in a visitor’s history with the website).

As I mentioned above, this Advanced Segment is one of the “default” or “pre-packaged” Advanced Segments that Google Analytics provides, without having to create your own. And, it’s one of the best ones. With it, you can see how visitors that have performed the actions that you have defined are behaving, what pages they are landing on, how often they return to your site, and anything else that you wanted to know, but were afraid to ask. You can learn a lot about your converted visitors with this segment (and get insights and ideas on what you can do to get them to convert again).

2. The Power of your Brand
(Dimension: Keyword; Condition: Contains; Value: the first word of company name; AND Dimension: Time on Site; Condition: Greater Than or Equal To; Value: 30; AND Dimension: Pageviews: Condition: Greater Than or Equal To; Value: 3)

Would you care to know how strong your brand name is, and how engaged visitors are that used your brand name or company name as their search term? This segment can give you excellent insight to your customers or potential clients who already know you by name, which means they are well beyond trying to find you, and are most likely closer to reaching out to you, or buying from you.

3. Social Media Awareness
(Dimension: Sources; Condition: Contains; Value: The name of any social media site: Facebook, MySpace, LinkedIn, Digg, Delicious, StumbleUpon, etc…)

Measuring the traffic that your website receives from social media platforms is becoming increasingly important towards these last few months of 2008, and you can expect Social Media to really become important in 2009. This advanced segment puts you in the game by allowing you to see all of the traffic from the more popular social media websites that are out there. Monitor this segment over time to get a feel for how interesting and engaging your social media initiatives are – if they are interesting, and if you have a strong social media presence, traffic will start coming your way before you know it.

BONUS Advanced Segment:

4. Are You Experienced?
(Dimension: Visitor Type; Condition: Matches Exactly; Value: Returning Visitor; AND Dimension: Days Since Last Visit; Condition: Less Than; Value:7; AND Metric: Time on Site; Condition: Greater Than; Value: 180; AND Metric: Transactions; Condition: Greater Than or Equal To: Value: 1)

This Advanced Segment excludes all pretenders, rookies, and newbies, and focuses on allowing you to analyze what your most experienced, best customers are doing. Use the clues that you find in your reports after applying this segment to learn what makes your best customers tick, and compare that against your customers who do not engage with your website at this level.

There are thousands of different possibilities with Advanced Segmentation, which means that once you start creating your own, you’re bound to come up with an advanced segment that will meet your specific needs, answer your specific questions, and become favorites of your own.

© 2019 MoreVisibility. All rights reserved.