Posted on August 31, 2010 by Robbin
Just a quick note to tell those of you in the Boston area that we will be sold out on the Boston GA Seminars for Success Intermediate Analysis in that city soon, and the Webmaster day is also getting pretty full. (Dates: Sept. 21-23. I think we will sell out on the Intermediate day by Labor Day.) Also, we are having another SEO workshop here in our fair city of Pittsburgh, October 12.
You can see our Google Analytics Seminars for Success training here, where you can also register. On the other hand, if you are interested in our Pittsburgh SEO workshop, go to this link.
View Comments (No Responses) | Categories: Industry News
Posted on August 27, 2010 by Jonathan
A recent question in the blog questions box (at the right, and please suggest questions if you have them):
My funnel goes something like this:
- A visitor clicks on an AdWords ad and lands on SiteA with the ?gclid tracking parameter
- The visitor clicks through to SiteB (which I control as well) and makes purchase
On SiteA, I’ve set up links so that the full query string is passed from page to page as the visitor clicks around. If the visitor lands on SiteA.com/landingpage.php?gclid=123456, each page they visit will have that query string ?gclid=12345. When they click through to SiteB, I can see that they came to SiteA (referrer) from Google (w/ ?gclid=). Does having the ?gclid parameter on all URLs on SiteA do anything to reports in either Adwords or Analytics for SiteA?
There are really 2 issues here: First, what does the gclid parameter do? Second, when we have a visit that starts on one site and converts on another, what’s the best way to see how someone arrived (on SiteA) and whether they converted (on SiteB)?
AdWords tracking
The gclid parameter, all by itself, just gives you a numeric identifier that you can’t do much with. However, it enables Google to do all kinds of magic behind the scenes by letting you access a whole suite of AdWords reports.
So if you’re just seeing the gclid parameter in your URLs in Google Analytics, you’re missing out on a whole ton of data about AdWords. How do you fix it? See this post on troubleshooting the link between your AdWords and Analytics accounts (an oldie but a goodie). Get that set up right, and suddenly you have all kinds of information about individual campaigns, keywords, placements, and ads — including things you can’t get in AdWords, like Bounce Rates and even an ROI calculation (if you have goal values or ecommerce revenue data to calculate it from)!
Landings on one site, Conversions on another
Believe it or not, this is a common problem. Lots of sites have a separate web application for a shopping cart (or donation site, or member signup site, etc.). People land on your “main” site (SiteA) but you send them to the other site (SiteB) to actually fill out some forms and convert.
Sure, by default you can see SiteA as a referrer (in the Referring Sites report) for the data for SiteB. But this isn’t ideal, because what we really want to know is, how did this visitor arrive at SiteA, and did they convert on SiteB? Basically, we want to treat them as one big site, even though they are actually two separate domains.
Google Analytics lets you do this through a feature called cross-domain tracking. It involves making changes to your tracking code on both sites to track them together and follow a visit across both sites, passing the information about the visit from SiteA to SiteB when the visitor crosses over. For more information, you can look in the Help Center, in the developer documentation on Google Code, or check out a book like Advanced Web Metrics with Google Analytics, which has a section in Chapter 7 about cross-domain tracking.
View Comments (No Responses) | Categories: Google Analytics
Posted on August 24, 2010 by Jim
Lately, we’ve been getting a lot of calls from companies looking for help with SEO. Maybe it’s because they’re finally starting to realize the value of SEO, or perhaps it’s a sign that the economy is turning around. Whatever the reason, we’re being tasked with evaluating new sites on a daily basis.
Generally, our first step is to do a quick (30 minutes or less) audit of the site to get a feel for where they’re at and what they truly need help with. However, this 30 minute task can easily turn into a couple of hours if you don’t have something to keep you focused and on track. (Seriously, who hasn’t started looking at inbound links to a site only to look up from your screen 3 hours later in a link-induced daze?)
Here’s what I use – a handy SEO Audit Checklist (PDF). This checklist was originally concocted by Taylor Pratt of Raven Tools fame (before Raven Tools, when he worked here at LunaMetrics) some years ago. It has since undergone several rounds of revision and updates.
There are typically three areas I look at:
- Accessibilty
- Keywords
- Links
The SEO checklist breaks those three areas down into a handful of items that can be quickly checked. I’ve included the most common and important items, like canonicalization, title tags, number of links, etc. It’s enough to give a quick idea of any issues the site is facing, both in terms of on-page SEO and off-page (links). It also prevents me from overlooking any critical issues, which would otherwise be easy to do given the quick nature of these initial audits.

Click to download
Tell me what you think! Are there things you check that I haven’t included? The comments are yours!
View Comments (10 Responses) | Categories: Search Engine Optimization
Posted on August 19, 2010 by John
If your site’s search results page uses a query parameter to denote what the visitor searched for, setting up site search in GA is pretty straight forward:


If your site does not use query parameters to denote the search term, however, you might see a results page that looks like this:

But in GA there is no “path” option:

What to do?
By altering the GA JavaScript on the search page you can cause GA to “think” that the page has a query parameter for the keyword.
In the traditional GA syntax there is a line of JavaScript on the page that looks like this:
pageTracker._trackPageview();
If we pass the _trackPageview() method a parameter, it will use that value as the URL for the page, INSTEAD of whatever happens to be in the browser’s address bar.
This might look like:
pageTracker._trackPageview(‘/searchresults/?q=[keyword]’);
Where “keyword” is replaced (by YOU) with the actual keyword that each particular visitor searched for.
This replacement can be done in several ways.
1. CMS script – your CMS system may have a template scripting language that allows you to reference the keyword value.
2. JavaScript - If your results URL is in a standard format and includes the keyword, you may be able to extract the keyword with a regular expression.
This might look like:
var s = location.pathname;
var re = new RegExp(“/search/([^/]*)/?$”);
var m = s.match(re);
pageTracker._trackPageview(‘/search/?q=’ + m[1]);
*Assuming the results page is in the format http://www.mysite.com/search/keyword
and further assuming my JavaScript and regex are even remotely accurate
– meaning don’t just use this example code and expect it to work, this is to demonstrate the *concept* only
3. Server side scripting language such as asp, php, cold fusion, etc.
This might look like:
pageTracker._trackPageview(‘/searchresults/?q=<?php echo $keyword ?>’);
*Assuming you have a php variable named “keyword” that contains the search terms used. Don’t just insert this example code into your site and expect it to work — this is to demonstrate the concept only
So the technical details of how you programatically get the keyword into the string of text that you pass to _trackPageview(. . .) will differ from case to case. But the ideas above should get your web developer started in the right direction.
View Comments (1 Response) | Categories: Google Analytics, Web Analytics
Posted on August 18, 2010 by Jonathan
We’ve written before about a variety of odd funnel behaviors (see the posts “Funnel Problems” and “Odd Funnel Steps“), but there are still things that confound folks looking at their funnels.
Your goal funnel in Google Analytics shows where people enter and exit. A lot of people ask me, “Why do I see pages here that you can’t possibly get to from this step? There’s no link on the page for that step to get there!”
Funnel, funnel, funnel, it’s a funny word
The funnel exits show pages that were viewed after a visit abandoned the funnel. Often, this means someone left your funnel in the middle by clicking on a navigation element or some other link on the page to go to another page on your site. But sometimes, it’s a headscratcher how a visitor could have gotten from a particular page in the funnel to that particular page on your site.
The thing to recognize about your funnel is, you have given it an ordering by setting up the steps in Google Analytics. You said, this is step 1, this is step 2, this is step 3, etc. However, your site doesn’t necessarily force visitors to navigate in exactly that order. If it’s a shopping cart, for example, visitors could go back to the previous step to change something. However, in the funnel report in Google Analytics, it’s showing us the number of total visits at each step, not the number of pageviews. A step could easily have been viewed more than once during a visit, or in a different order than we’ve specified, but as far as Google Analytics cares, the furthest step down the funnel a visitor reaches is where they abandoned the funnel.
The upshot of this is, a visitor could be on Step 3, go back to Step 2, and exit. In the Funnel Visualization report, however, their exit appears in Step 3, the furthest point down the funnel they reached. So maybe there’s a link to that page from Step 2? Or step 1? Or maybe they backed all the way out of the funnel entirely?
More of Users Doing What We Don’t Expect
The other thing to recognize about Google Analytics is, it’s not following our visitors around the site and seeing how they navigate from Page A to Page B to Page C. (It’s not like ClickTale, for example, which is actually recording their mouse movements on a page.)
All Google Analytics sees is a string of successive pageviews. Normally we expect that someone is browsing around in a single stream of pages: here’s where they land, then they went here and here, then they hit the back button, then they searched, then they left, whatever.
But if you’re anything like me, you have multiple tabs open in your browser (boy, do I!). And suppose someone has multiple tabs open of your site. Well, they might browse around in one and start the checkout process, then decide they’re not ready. But they go back to that other tab they had open with the product page and browse around a little more before they leave.
Suddenly, the page right after they abandoned the funnel is one that’s not linked to from anywhere in the funnel, they just followed a link from another page they already had open!
The Moral: This is a lesson that comes into sharp focus with funnels, because we are trying to impose an expectation of how visitors browse our site. But the takeaway here is, visitors rarely browse in exactly the ways you expect them to. We have this nice, neat vision of how someone will use our site, and it rarely actually works out that way. Use analytics to focus on the really important things (why are they abandoning the funnel? how can I bring them back?) but don’t get bogged down in creating the golden path from landing page to thank-you page – because there isn’t one.
View Comments (3 Responses) | Categories: Google Analytics
Posted on August 5, 2010 by Jim
As a search analyst, I’m often obsessed concerned with how many visits a website has received from search engine traffic. It’s one way to measure the success of an SEO project. Even better, I like to measure how many visits came from non-branded keywords (because those are the people who don’t already know you – new blood!).
But there’s one thing I want need to know and track on an ongoing basis that GA just doesn’t do. I need to see how many keywords send traffic and whether the number of keywords (NOK) is increasing or decreasing. Fortunately, GA does at least tell us how many keywords sent visits for a specified period, it just doesn’t let us see how that number changes over time.
Why are number of keywords important?
There are a couple reasons why I need to know whether the NOK sending traffic to a site is increasing or decreasing over time. Generally, it helps to measure progress during an SEO project. It’s one more indicator of success, especially if a main piece of the project involves creating content.
Indexation
If the NOK is increasing, that’s a good indication that the number of pages of the site being indexed and/or ranking highly is increasing. If you’re creating a lot of new content (blog posts, video, recipes, articles, etc.) it’s good to see if your efforts are paying off.
Of course, other factors can affect your NOK. Maybe you’ve changed your navigation menu or site architecture, or maybe you’ve been doing a good job of getting links to deep pages within your site. The effects of those endeavors will likely be seen in your NOK.
Early Alert
Monitoring your NOK also gives you a heads-up on site issues. If you see your NOK suddenly decrease, you can quickly look into any site changes that were made that may have caused a drop in rankings or indexation. No changes? Maybe your site’s been hacked (check Google Webmaster Tools for your site and Fetch as Googlebot).
Variety
Is your blog like a broken record? Do you keep talking about the same thing over and over again? Check your NOK – is it stagnant? Maybe you need to talk about something different, or at least from a different perspective. By introducing more variety to the content on your site or blog, you’ll be able to target different keywords. Even if your blog or site is very narrowly focused, I’m sure you can find some aspect of your niche that you haven’t discussed before.
How to Monitor Your NOK
Like I said before, GA doesn’t make it easy to monitor your NOK over time. To do that, you’ll have to do some manual labor in Excel. It’s nothing fancy – no macros or formulas involved – just some simple data entry and charts and graphs. Here’s a sample chart of what you can get, followed by the step-by-step instructions:

1. Open Excel and create a new spreadsheet. In the first column, label the first row “Date” and the second row “NOK” (or Number of Keywords, if that’s easier to remember).

2. Determine how often you want to monitor your NOK. I recommend at least once a month, but if you are actively engaged in link building or if you’re making some significant site changes, you may want to check this more often. Of course, you can go back in your analytics data as far back as you have it, so in addition to keeping track of it moving forward, you can back fill previous months. At this point, you can fill in the specific dates in the columns of your spreadsheet.

3. Find in the numbers. The only thing left to fill in on our spreadsheet is the number of keywords that sent traffic for each month. This is easy enough to find in Google Analytics. Go to the Traffic Sources > Keywords report. Set the date range to the month (or week or day) you’re interested in, and you’ll find the NOK right beneath the graph, like below:

(click to enlarge)
4. Fill in the numbers. Take the NOK from that report and enter it in your spreadsheet. Then wash, rinse and repeat. In a few minutes, your spreadsheet should look similar to this:

5. Create a chart. You’re almost done! Now all you have to do is create a chart based on that data, which is easy enough to do in Excel. From the “Insert” tab, click on Line chart:

6. Select your chart data by clicking on Select Data. In the pop up menu, for “chart data range” just click on the cell with the first month’s number (1,578 in the example below) and drag to the last month’s number (or you can hold “shift” and click on the last number).


7. Fill in the details. You can pretty-up the chart by editing the labels for the horizontal axis and series name, and in no time, you have the chart that I showed you at the beginning.
Now, if someone could create a Firefox plugin or web app using the GA API that would do this automatically, I’d be a happy man. Any takers?
View Comments (13 Responses) | Categories: Uncategorized
Posted on August 3, 2010 by Robbin
You might already know that we’re doing a Google Analytics Seminar for Success in DC next week (August 10-12.) But you might not have heard that the second day, Intermediate/Advanced analysis (GA 201) sold out. So we’re going to have a free webinar with some of our favorite GA 201 topics (about 1.5 hours long) for anyone who signs up for the 101 or 301 after the date that we sold out (last Monday).
(sidenote: I just noticed that someone who wanted to do the 201 and 301 in DC registered to do them in Boston. See below)
We’ll also be training in Boston (Sept 21-23), Chicago (Nov. 2-4) and NYC (Dec 7-9.) All registrations can be done at the same page, http://www.lunametrics.com/google-analytics-training/seminars
Robbin
View Comments (1 Response) | Categories: Announcements, Industry News
Posted on July 30, 2010 by Jonathan
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 (12 Responses) | Categories: Google Analytics
Posted on July 27, 2010 by Robbin
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 (6 Responses) | Categories: Regular Expressions
Posted on July 23, 2010 by Jonathan
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 (No Responses) | Categories: Custom Variables
Follow us on Twitter
Become a fan on Facebook