Archive for July, 2010
Posted on July 30, 2010 by Jonathan Weber
Recently several people asked me about confusing numbers involving unique visitors (one was a customer and the other used the great little blog idea submission form at the right).
Visitors represent the number of distinct people who come to your site (rather than Visits, which is the number of times that they come). Seems pretty straightforward, right? Well…
One person wrote:
I’ve been puzzled about the difference between “Absolute Unique Visitors” and “Unique Visitors”. In some cases, # of Unique Visitors is double of Absolute Unique Visitors! How it could be? I have no idea how Unique Visitors is calculated and its definition.
And the other asked:
How much variability is there in google analytics? When I run a custom report to get unique visitors over a month it can range from 195k to 214k. Sometimes I get a daily count of 0 and other times I get a count of 261 for the same day.
There are potentially several issues going on here.
Two kinds of “unique” visitors
First of all, as the first question points out, there are actually two metrics for unique visitors in Google Analytics. There’s Absolute Unique Visitors and Unique Visitors.
Absolute Unique Visitors is the metric you get in the report of the same name in the Visitors section. It used to be the only place you could get visitor metrics in GA. It’s also fairly limited: notice that you can’t use Advanced Segments on this report (one of the few where you can’t).
Unique Visitors is another metric that was introduced for use in Custom Reports (which you can use Advanced Segments on as well). It was an update to the Absolute Unique Visitors that was more compatible with these new features, basically.
The metrics themselves actually differ slightly in the way they measure visitors (how they tabulate the individual cookies). So the numbers won’t match up exactly. In fact, Unique Visitors is actually more accurate than Absolute Unique Visitors (surely a nominee for the Worst Title Ever in Google Analytics). Unique Visitors will usually show a slightly greater number (on the order of 5-20%, based on a few sample accounts I looked at). Since Unique Visitors is the more accurate and flexible metric, Absolute Unique Visitors is being phased out over time and someday we will have the One True Visitor Metric.
Uniques depend on the time period
One really important thing to recognize is that, “unique” depends on what time period we are referring to.
Take this Absolute Unique Visitors report.

For the 30 days that I am looking at here, there were 12,926 Absolute Unique Visitors (listed at the top there). But if I went through and added up the numbers for each of those 30 days (in the bar chart), it wouldn’t equal 12,926. Why?
Well, suppose I visit the website on Monday. Maybe I visit once or twice or 67 times, it doesn’t matter. I am 1 unique visitor for Monday, and the bar for Monday goes up by 1.
Now I visit again on Tuesday (once or twice or 67 times again). Tuesday goes up by 1.
BUT, for the whole month, I am still just 1 unique visitor out of those 12,926. It doesn’t matter whether I only came once on one particular day during that period, or once every day, or 67 times every day.
So it’s really important that you recognize this when you talk about unique visitors. Are these daily unique visitors? Monthly? It’s really important what the time frame is. You can’t, for example, take the number of monthly unique visitors for January, February, …, December and just add them up to get the annual unique visitors.
The dreaded sampling
The data in the standard Google Analytics reports is all pre-computed, and it’s pretty exact. If a visit got recorded, you’re going to see it there.
However, when you start combining things that weren’t pre-computed — for example, with an Advanced Segment or Custom Report — Google Analytics does the computations on the fly. If you have a really busy site, this would potentially take a looooooong time.
So instead, if you have more than 500,000 visits in the time period you are looking at and you request data that needs to be computed on the fly, Google Analytics takes a statistical sample of the data and gives you an estimate with a range of error, rather than tabulating every single visit. You’ll get a little notice that says “this report is based on sampled data” and a +/- error margin along with your metrics. (There’s more info about how this works in the Google Analytics documentation.)
This is something you should also be aware of when you’re looking at reports, because it can drastically affect accuracy, especially for segments or dimensions where the total number of visits is small compared to the total visits. If you need exact numbers, try to keep to time periods with fewer than 500,000 visits.
View Comments (32 Responses) | Categories: Google Analytics
Posted on July 27, 2010 by Robbin Steif
A couple months ago, I published a RegEx for Google Analytics ebook. You can download the ebook or just “page through it” online . The last page was a quiz, and I promised the answers — here they are:
- Question 1: Write a Regular Expression that matches both dialog and dialogue.
- Answer: Since you should always keep your RegEx simple, my best answer would be dialog|dialogue . Slightly more elegant but more complicated would be dialog(ue)? I’ll just invite others here (and for every other answer) to submit alternative ideas.
- Question 2: Write a RegEx that matchest two request URLs: /secondfolder/?pid=123 and /secondfolder/?pid=567 (and cannot match other URLs)
- Answer: ^/secondfolder/\?pid=(123|567)$ — note, I chose to put a dollar sign at the end so that the regex stopped matching if anything came after the three digits at the end of the target strings.
- Question 3: Write a single Regular Expression that matches all your subdomains (and doesn’t match anything else). Make it as short as possible, since Google Analytics sometimes limits the number of characters you can use in a filter. Your subdomains are subdomain1.mysite.com, subdomain2.mysite.com, subdomain3.mysite.com, subdomain4.mysite.com, www.mysite.com, store.mysite.com and blog.mysite.com
- Answer: There are lots of ways to do this. My choice would be: (subdomain[1-4]|www|store|blog)\.mysite\.com$
- Question 4: Write a funnel and goal that includes three steps for the funnel and the final goal step (four steps in all), using Regular Expressions. Notice that there are two ways to achieve Step 2.
- /store/
- /store/creditcard or store/moneyorder
- /store/shipping
- /store/thankyou
Answer: This one requires a picture:
The RegEx for Step 2 is hard to read in the picture above, it is /store/(creditcard|moneyorder)$ . Notice that I added a dollar sign at the end of all the expressions above. Without context, it is hard to know which ones are mandatory, but we know for sure that the dollar sign in Step 1 is mandatory. That dollar sign is required, not because of regular expressions, but because of the strange way funnels sometimes work. For more information on that one, you might want to read this excellent post on goals and funnels that Jonathan Weber of LunaMetrics wrote.
Finally, let me end with a great quote! (I didn’t ask permission to use her name, so I will just use an initial.) This reader wrote me yesterday to ask, where were the answers? Here is part of what she wrote:
Seriously, your ebook was so full of win. I’ve been trying to wrap my mind around RegEx and have been using the basics in GA for a while. But I really expanded my understanding b/c your explanations were so plain English and applicable to GA. A lot of tutorials I saw online weren’t written for GA and were written by propellerheads, I suspect.
Having worked for a graphics publishing company, I also REALLY appreciated the layout, font treatments, and graphics. A world-class job all the way around. — A
– Robbin
View Comments (12 Responses) | Categories: Regular Expressions
Posted on July 23, 2010 by Jonathan Weber
This is the third post (at long last) in a series about custom variables. We’ve already written about why to use custom variables and how the code works. This last part is about a subtlety of how custom variables operate called “slots”.
Slots and Scope

You’ll remember from Part II that the “slot” or “index” is the first argument in the _setCustomVar function, and we glossed over it at the time because it deserved a whole post of its own.
You can think of the slots like little mailboxes to Google Analytics. You write the name/value pair on a slip of paper and stuff it in the hole, and the Google Analytics mailman pulls it out the other side and notes down the value. There are 5 slots, numbered 1-5, and each slot can only hold one slip of paper at a time.
“So,” you might say, “that means I can have 5 custom variables, right?”
Well, not exactly, because remember each variable has a scope: visitor-, session-, or page-level. Each one of these works slightly differently.
With a page-level variable, the Google Analytics mailman takes the slips of paper out of the box on every page. The boxes are empty again, and available for you to put another slip of paper in on the next page.
With a session-level variable, the Google Analytics mailman takes the slips of paper out of the box at the end of a visit. You are allowed to put a new piece of paper in the slot, but you have to throw the old slip away first.
With a visitor-level variable, the Google Analytics mailman takes the slip out, writes down the value, and puts the slip back in the box (it stays in the __utmv cookie). Again, you can put a new piece of paper in, but you have to throw the old slip away first.
In any slot, the last value recorded wins.
OK, that was a nice story. Just the executive summary, please.
So what’s the upshot here?
- You can reuse a slot on different pages for a page-level variable.
- If you reuse a slot for a session- or visitor-level variable, the last value wins. So make sure you really, truly want to overwrite the slot when you’re doing this. Sometimes this makes sense (someone changes status from “member=gold” to a “member=platinum”). Mostly, you want to dedicate a slot to each mutually exclusive session- or visitor-level variable.
- You should always put variables with the same key in the same slot. You don’t want “member=gold” appearing in 2 different slots, or worse yet, “member=gold” in slot 1 and “member=platinum” in slot 2.
- The most important lesson is that managing the way the variables is stored is up to you. If you have a complicated situation with lots of variables, make sure you create a chart of slots and scopes to keep track of it all.
Knowing the slots
Being aware of the slots is important, even if you throw this over the fence to your developer and assume they can sort it out. The reason that slots are important is that, to use a custom variable in an Advanced Segment (or in cross-segmentation in reports, or Custom Reports), you need to know what the slot is:

Learning more
The Google Code site has some fairly good documentation on custom variables. But the very best thing you can do is watch this webinar in which Phil Mui (the product manager for Google Analytics) walks through exactly how these things work. Straight from Phil to you; it doesn’t get better than that when you want to know something about how GA works.
View Comments (3 Responses) | Categories: Custom Variables
Posted on July 19, 2010 by Christina Keffer

Or doesn’t care.
Hi! I’m Christina. I’m an SEO. It’s what I do full-time for a living. You know why? Because it takes one person (me) at least 40 hours a week to do all that’s necessary for 5 or so clients. It’s all I can do to keep up with the daily demands on my time and makes sure I am doing all that’s necessary on-page and off-page to make sure my clients rank higher and get the kind of quality traffic in quantities that I have told them are possible.
My BF (best friend, or boyfriend? OR BOTH? You decide!) is a web developer. Full time. 40 hours a week (at least) of taking assets from a PR firm and converting them into working awesome websites that are perfect regardless of which browser you’re looking at.
Yet another friend of mine is a graphic designer. He spends about 60 hours a week (he’s insane) taking the vague, nebulous “I kinda like bricks. Can you create for me a background that’s sorta brick-like, but not TOO brick-like.” requests from crazy people and codifying that nonsense into awesome well thought-out, engaging designs for websites. AND he now leaves room for blocks of text in his designs ’cause I threatened his life if he didn’t.
So when some web designer comes along and says “I Build Search Engine Friendly Web Sites And Specialize in Usability and Graphic Design,” I say “You and what army, buddy?!” Because, honestly, each one of those separate elements is one person’s full time job.
The most egregious cross-crafting claims seem to come from web development/design firms. I’ve seen a rash of it lately, and it’s ticking me off, so I’m going to embark on the web-designer-disparaging rant that every SEO seems to indulge in at least once in their career.
If you’re a small business owner or indeed anyone shopping around for web designers/developers, this post is for you, so listen up. If you wouldn’t ask the following questions, listen way harder, ’cause you totally should.
Sign #1 That Your Web Designer Knows Bubkus About SEO:
During the web designers sales pitch, you say “I’m concerned about the Search Engines’ ability to access and properly index my site. Consequently, I’d like to know what kind of code you’ll be using to render the major design elements of my site.” and they answer:
a. Flash
b. Javascript
c. It doesn’t matter
d. I am be coding very well, it’s ok.
No! No! Bad web developer! Bad! Search engines are crappy at indexing stuff in Flash videos, they don’t execute Javascript and it TOTALLY matters that you use correct HTML and CSS to create major design elements!
How would it be if you launched your site, only to discover it can’t get indexed because the HTML navigation was triggered by JAVASCRIPT and couldn’t be accessed by the search engines. Really crappy, as one unfortunate client of mine recently realized.
Sign #2 That Your Web Designer Knows More About the Flight Patterns of African Swallows than SEO
After the first answer, you start thinking, damn I better quiz this guy a bit more. After all I can stipulate how I want my code written, right? Maybe they’ll still prove acceptable. So, you ask “What would you recommend for home page content?” and they smile knowingly and say:
a. A splash page that asks the user whether or not they want the Flash version of the site or the HTML version
b. A splash page that is a one-time intro and that is bypassed after it has planted a cookie in the user’s browser
c. A copy-less page with huge, high-def pictures of your products that play on an embedded flash player, and one link to the “contact” page.
d. I am making you very good a home page with many links and picture movies.
Swing and a miss you naughty developer you. Splash pages are an SEO nightmare. Doubly so when they lead to two different versions of the site. Forget the duplicate content issues, think of total void of index-able copy that most of these types of pages suffer from. Also, Search Engines don’t download cookies, so in the case of suggestion B, the SE will never get past your crappy splash page or index any internal pages on the site. If the SEs have nothing to index, THEY WON’T INDEX ANYTHING!
Sign #3 That Your Web Designer Wouldn’t Know Good SEO if it Jumped Up and Bit Them on the…Face.
By now, you should be running far, far away. If the dude or dudette who told you they do web design AND SEO has given you any of the previously mentioned answers, for the love of little green apples, find someone who can do better. However, if you feel like torturing yourself or just getting a good laugh, ask them the following question: “What’s the difference between a 301 redirect and a 302 redirect?” You’ll likely get the following answers:
a. Nothing. They accomplish the exact same task: taking the user from a defunct page and sending them to another.
b. Did some crappy SEO set me up?
c. Ever heard of a meta refresh redirect? Duh, everyone’s using them now.
d. I am seeing no need to worry about redirecting. We’ll take care of it.
Wrong, wrong, wrong and ugh. Firstly, although the user experience is the same for both kinds of redirects, only one passes on the SEO benefit of any inbound links: the 301 redirect. Secondly, Yes, I, the SEO, totally set them up to protect themselves against frauds who claim they know SEO. Thirdly, the world wide web consortium has completely deprecated the use of the meta refresh tag and suggests using javascript in the VERY VERY rare event that you’d ever need a page to refresh automatically and often. The refresh redirect is of the most abused forms of redirect out there right now.
And fourthly, and perhaps most importantly, don’t ever let someone tell you redirects are unimportant especially if you’re switching over a site that ranks great to a new design with different URLS. It will totally, totally screw you over.
Sign #4 That Your Web Designer Knows Less about SEO than my 95 Year Old Grandma
The question “What will the URLs look like?” is answered any of the following ways:
a. It depends on how the user got to the page. There is a bunch of parameter stuff and you don’t need to worry about it.
b. They’re dynamically generated. The search engines won’t care. Lots of sites have dynamically generated URLs.
c. Look at this cool session id…
FYI, all of you out there in search of SEO knowledgeable web designers who are about to get seriously messed up by bad URLs, it is almost always to provide the static-appearing, keyword rich URLs that the search engines prefer. There is no good reason for a session id anymore- that’s done with cookies these days, and search engines do care a lot about how clean the URL is. It should also have keywords in it. So there.
The 5th and Most Irritating Sign That An Untrained Monkey Knows More about SEO Than Your Web Designer
If, when you start querying your designer about SEO concerns, they condescendingly shake their heads and say any of the following, stand up and equally condescendingly slam the door on your way out of their office: 
a. SEO can be done effectively after the design process is completed, so don’t worry yourself about it now.
b. SEO is easy. We do it all the time. Don’t worry about it.
c. SEO is as complicated as web design and I don’t’ think you’ll understand what we do even if I explain it to you.
d. I guarantee you that if we do your design, you’ll rank #1. Cross my heart and hope to die.
If I ate a carrot every time I heard answer #1, I’d be able to see in the dark. You have to take SEO into consideration from the very beginning of the web design process. You’ll get the most bang for your buck later if the foundations of the Site are SEO friendly.
SEO is not easy. I swear to god, it’s not. It’s hard, it takes oodles of time and it’s constantly changing so even if your web designer knew what he was doing 5 years ago, it doesn’t matter because it’s probably wrong now. SEO, however, is not rocket science, or even molecular biology. You can understand the fundamentals at least enough to make an educated decision as to who to have design your site. And lastly, if anyone claims that they can guarantee rankings, they’re simply full of it. Period.
Disclaimer that will keep me from being flamed by Web Designers (hopefully)
Now that I’m done with my tirade, let me give some caveats that should do at least a bit to put out some enraged fires:
1. I don’t actually think that web designers have to know anything about SEO. That’s what SEOs are for. However, I do take issue when someone CLAIMS to know SEO and marginalizes an entire industry into an add-on to a web design package and then screws it up.
2. There are a lot and I mean a LOT of web designers who can answer all these questions flawlessly. These individuals who somehow balance their knowledge of design with their knowledge of the requirements of the search engines are priceless and awesome and you should hire them when you find them.
3. There are even more web designers and web design firms who know they don’t know and partner with SEO firms to make sure their finished product is awesome and SE friendly. This is commendable. If I were a business owner looking for a web design firm, I would choose this kind of setup.
So don’t flame me, mkay?
View Comments (52 Responses) | Categories: Search Engine Optimization
Posted on July 15, 2010 by John Henson
Sometimes when presenting a report to someone else, you may want to display a list of pages as Page Titles instead of URLs. But you still want to filter the list to show only certain pages. And you want to filter the list to only show certain pages based on the URL.
In the screenshot below, I am displaying a report by URL and as the
Secondary Dimension I have selected Page Title. The filter at the bottom of the report works on the First Column and I have filtered the report to a particular subdirectory.

So far this looks pretty straight forward, right?
THE CATCH:
The catch is, in GA, there is no option to select Page Title as a Secondary Dimension in the URL report.

This means that if you want to display the pages by Page Title for only a sub-directory, you’d have to come up with a very convoluted filter to filter in every page title in that subdirectory and at the same time remove unwanted positive matches from other sub-directories.
So how did I get URL and Page Title to show up in the same report?
The trick is in using a URL parameter called “segkey” which you add to the URL in the address bar for the report. For reference, I’ve included the report URL below (Note that I xxx’d out the ID for the profile):
https://www.google.com/analytics/reporting/top_content?id=xxxxxx&pdr=20100515-20100614&cmp=average&trows=10&gdfmt=nth_day&rpt=TopContentReport&segkey=request_uri|page_title&tab=0&tchcol=0&tst=0&tscol=v0&tsdir=0&mdet=WORLD&midx=0&gidx=0&glcnt=1#lts=1276612598642
Step 1: Generate your Top Content Report
Step 2: Copy and Paste &segkey=request_uri|page_title into the url in the query parameter section of the URL (amidst the other & parameters)
Step 3: Press enter and enjoy your report.
There are a couple of reasons, from an SEO perspective, that you may want to show both the page URI and page title together.
1. Find duplicate title tags – If you’re looking at a specific section of your site, like in the example above, you can quickly see how targeted your title tags are. You might even find duplicate title tags. In the example above, you can see we have two pages with the same title tag – #4 and #8. Each page on your site should have a different title tag, and this gives you the opportunity to be more specific and target more long-tail search terms.
2. Monitor & Measure – If you’ve changed the title tag on a page, you can filter to contain just the URI for that page, then show a month before and a month after the change to see if traffic to that page has increased or decreased.
Thanks to
Jim for the “Other reasons to do this” section, and thanks to
Christina for helping me to rewrite parts of the post.
View Comments (15 Responses) | Categories: Google Analytics, Web Analytics
Posted on July 12, 2010 by Robbin Steif
Just a quick note to tell you that we’ll be doing Google Analytics Seminars for Success in four cities during the second half of 2010:
Washington DC: August 10-12
Boston: Sept. 21-23
Chicago: Nov. 2-4
NYC: Dec. 7-9
You can check out all the details on our Google Analytics training page.
View Comments (No Responses) | Categories: Industry News
Posted on July 7, 2010 by Jim Gianoglio
We’ve talked about tracking local search results and tracking Google Product search results before, so it seems natural to look at how you can also track Google video results. When I say Google video results, I’m referring to the video listings that are included in the main SERPs (search engine results pages), as seen below for a search on Tour de France video:

Why track video results?
If you’re spending time, money, and other precious resources to produce video content, don’t you want to have as much intelligence as possible about how that content is performing? In the results above, if I click on the bottom result (for the Guardian’s video) and go to their site, my visit will show in their analytics as coming from Google/organic, with no indication that it was a video result that got my attention and compelled me to click.
Knowing how much traffic you are getting to your video content from these video results (and segmenting to see if this traffic is valuable) can help you make a number of decisions. Maybe you’ll find out that a lot of your organic search traffic is actually from video results right when management is getting ready to cut the video budget (whew, crisis averted!). Or perhaps you segment this group of visitors to find out when they watch. Are you posting new videos when your audience is actively seeking them out?
How to track video results
It should be noted that this will only work if you host the videos on your own server. If you use YouTube, you’ll have to stick to their Insights data about your video. If you do host the videos on your own server, then you get a big gold star sticker and can proceed. There are five easy steps to tracking your video results:
- Create a video Sitemap file
- Include vanity URLs
- 301 redirect to URLs with tracking parameters
- Submit video Sitemap
- Monitor the results
1. Create a video Sitemap file
You can either create a video Sitemap file (XML), or add video content to an existing Sitemap based on the Sitemap protocol. The latter is a new development (as of June 29, 2010 – see http://googlewebmastercentral.blogspot.com/2010/06/sitemaps-one-file-many-content-types.html). Either way, it works just the same. The idea is that you create a XML file that gives the search engines details about your video content, like title, description, play page URL, thumbnail URL, raw video file location and several other optional attributes.
Here’s an example of a video sitemap for a site with just one video:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>http://www.example.com/videos/some-video-landing-page</loc>
<video:video>
<video:content_loc>http://www.example.com/video123.flv</video:content_loc>
<video:player_loc>http://www.example.com/videoplayer.swf?video=123</video:player_loc>
<video:thumbnail_loc>http://www.example.com/thumbs/123.jpg</video:thumbnail_loc>
<video:title>Grilling steaks for summer</video:title>
<video:description>Alkis shows you how to get perfectly done steaks every time</video:description>
<video:rating>4.2</video:rating>
<video:view_count>12345</video:view_count>
<video:publication_date>2007-11-05T19:20:30+08:00</video:publication_date>
<video:expiration_date>2009-11-05T19:20:30+08:00</video:expiration_date>
<video:tag>steak</video:tag>
<video:tag>meat</video:tag>
<video:tag>summer</video:tag>
<video:category>Grilling</video:category> <video:family_friendly>yes</video:family_friendly>
<video:duration>600</video:duration>
<video:restriction relationship="allow">IE GB US CA</video:restriction>
</video:video>
</url>
</urlset>
2. Include vanity URLs
In your Sitemap, when you list the page that each video is on, use a vanity URL. For instance, in the example above, the page is listed as http://www.example.com/videos/some-video-landing-page . Change that to something like http://www.example.com/videos/some-video-landing-page/vid
3. 301 redirect to URLs with tracking parameters
Set up 301 redirects from your vanity URLs to the actual video page URLs with campaign tracking parameters appended. To follow the example above, we would 301 redirect
http://www.example.com/videos/some-video-landing-page/vid
to
http://www.example.com/videos/some-video-landing-page/#utm_source=googleVideo&utm_medium=organic&utm_campaign=videoTitle
Notice the use if the hashtag (#) to set of the parameters instead of the question mark (?). Here’s why you should use the hashtag and how to set it up.
4. Submit video Sitemap
After your video Sitemap has been created and uploaded to your server, and you’ve set up 301 redirects for your vanity URLs, go to your Google Webmaster Tools account and submit your Sitemap.

You can also include the location of your video Sitemap (if different than your main Sitemap) in your robots.txt file. It should look something like this:
User-agent: *
Sitemap: http://www.example.com/sitemap.xml
Sitemap: http://www.example.com/vidsitemap.xml
5. Monitor the results
Once you’ve gone through steps 1-4 and given Google enough time to discover your video Sitemap, you can log into your analytics and dig into the details. You should be able to see visits coming from the video results, and compare them to other traffic sources, find out which keywords were used and much more.

View Comments (2 Responses) | Categories: Google Analytics, Web Analytics