Archive for 2007

More on GA Visitor Loyalty (and unique visitors)

Can you combine your unique visitor numbers and your visitor loyalty numbers (in GA) to learn more about returning visitors?

That was ultimately the question that faced me when I sat down at my computer today. A few weeks ago, I wrote about GA Visitor Loyalty, and today, read this comment/question from a reader:

I looked at the following:

Unique Visitors (39811 for the last month on my site))
minus
# of 1 times visits (37037)

Wouldn’t this mean that about 2800 different people visited my site more than once?

But no …

For this year, I had 306,810 unique visitors and 305,025 # of 1 times visits. Following my above logic, only 1800 visited my site more than once for the year, but 2800 did so for the month.

Any explanations?

So here is my answer, for this reader, and for anyone else who is interested:

Let’s start with your first question: If you take unique visitors and subtract the one time visits from that, won’t the difference be about equal to the number of people who visited your site more than once in the period?

Answer: No, it won’t. In fact, to make this easier, let’s reformulate the question: Why aren’t unique visitors in the period equivalent to one time visits?

“Unique visitors” measures how many times unique browsers (and we will just call them “people”) visited in a specific time period. But the Visitor Loyalty does something different. It says, “For every visit during this period, tell me the visit history for ALL TIME.” So the first time that I did the testing in this post (the testing that ensured I was the only visitor), I visited once, I went back the next day, and I was shocked to see that in the Visitor Loyalty chart, there was only one visit (no surprise there) and it was in the 201+ visits category (that was the shock.)

Unique visits for any time period are sprinkled throughout the chart. Maybe they visited once this month, but last year, they visited 35 times, and so this one visit, unique this month, or unique this year, is their 36th.

Ultimately, the Loyalty Chart is the wrong place to do this work — you need filters to include just returning visitors, or a filter to exclude new visitors. You might create a new profile with an exclude filter on “Visitor Type” and use the word new– that way, you will only get returning visitors in your profile. And then you can start to learn more. (Need to learn more about creating custom filters?)

- Robbin

Share and Enjoy:
  • Print
  • email
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Facebook
  • Twitter

Should you convert to the new Google Analytics code now?

With the new Google Analtyics code (ga.js) now available, a number of people have emailed us over the past few days, asking the question in the title of this post.

 

In the matrix below, you can see how I visualize the issues. Should I convert to GA.JS?

We have here a business problem (how badly do you need the new code?) crossed with a technical problem (how easy is the implementation for you?)

 

The southwest quadrant is the easy one. You are dying for the new features that you will get in the new ga.js (the new Google Analytics), such as event tracking. And your implementation is an easy one. Easy implementations include:

  • You have a staging server so can make lots of mistakes at no risk
  • You are implementing the code for the first time
  • You are redesigning, and so need new code anyway
  • …and then there is always, “What’s the big deal? I have a small site, it’s one domain, if I lose a day of data, life will go on.”

In the northwest corner, we have a similar (but not as compelling) situation – the implementation is easy, but you were pretty happy with the old urchin.js code. So, convert when you can. Like I said to one of our customers today, “Let’s finish this project and then do it after the new year.”

In the northeast corner awaits our most difficult quadrant. There, we no longer have a compelling business case, and the implementation is a hard one. For example, you might have a large, mission-critical site without a staging server. (I know that sounds strange, but I have seen stranger situations.) When this is no longer easy to do, and you don’t really need the cool features you will get, you will be hard pressed to do the conversion. Maybe that means, hard pressed to get it into your budget. Ultimately, you’ll have to convert. I have no inside line on when GA will require everyone to convert. But I do feel confident in saying that you will get some warning of some kind (and I don’t have any inside scoop on that. I just believe it.) My recommendation: procrastinate.

Finally, there is the southeast quadrant. Here, desire for the cool new things you can do with the new version (like making it really easy to have different copies of the ga.js on the same page, so that you and your advertisers can both see how you are doing) will supercede your technical difficulties. To this website owner, I suggest that you let a couple of months pass (after all, you can’t get a lot of the new functionality yet until you have the ability to see those events. So you might as well let other people debug the code.) You could also start to gradually add the code on pages that aren’t mission critical. Remember, you can’t have both the new ga.js and the old urchin.js on the same page. You might start with a test site so that you can discover issues yourself.

So, should you convert to the new Google Analytics (ga.js) code right away? It depends.

- Robbin

Share and Enjoy:
  • Print
  • email
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Facebook
  • Twitter

Blogger Blogs, ga.js, and XHTML

  If you’re having trouble getting the new Google Analytics, ga.js code to work on
  your Blogger Blog, we have a quick and easy fix for you.

  Actually, this fix isn’t specific to Blogger or even Google Analytics for that matter. 
  To make your web pages XHTML-compliant, you should either do this on all of your
  scripts, or you should move your scripts to a separate file.

  Here’s an example: (Beware of smart quotes.  WordPress keeps changing my formatting automagically.)

<script type=’text/javascript’>
//<![CDATA[
var gaJsHost = (("https:" == document.location.protocol)
? "https://ssl." : "http://www.");
document.write("\<script src='" + gaJsHost
+ "google-analytics.com/ga.js' type='text/javascript'>\<\/script>" );
//]]>
</script>

<script type=’text/javascript’>
//<![CDATA[
var pageTracker = _gat._getTracker("UA-XXXXXXX-1");
pageTracker._initData();
pageTracker._trackPageview();
//]]>
</script>

See how the first line after each script tag, we have: //<![CDATA[

And right before closing each script tag, we have: //]]>

The forward slashes are JavaScript comment indicators for older browsers that don’t understand CDATA.  This post on About.com provides some additional information.  Note the author uses multiline comment characters rather than the // we use here.  Both methods will work just fine.

So what have we done?

  We told the browser’s validator to ignore our script by wrapping it in the CDATA
  tag.  So now Blogger and the W3C will happily accept your Google Analytics
  Tracking Code.

  – Jason Green
 

Share and Enjoy:
  • Print
  • email
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Facebook
  • Twitter

GA Site Overlay (and a letter to you, Avinash)

Dear Avinash:

I know you say that you aren’t the guru of Web Analytics. Nevertheless, every time you speak or write, people change how they do their work based on your thoughts. Some of those people are my customers!! So you have to start approving your posts with me first…..

Well, I guess that won’t happen. But here is my concern with your excellent blogpost today: Unlike you, I never look at the site overlay, and I think it is the least helpful report in GA.

Here is why: the Overlay is just a visual representation of the content > Top Content report. So if you have a link to your shopping cart on your home page, and you have a link from all your other pages, they all get the same values in the Google Analytics overlay. There is no differentiation based on which page the visitor was actually on when he made the click. You can add a query parameter to differentiate links that go to the same page, like so: /shoppingcart/index.html?link=home. However, you (arguably) create an SEO problem for yourself by creating duplicate content with that technique.

Furthermore – as soon as you rewrite your URLs in any way, your overlay breaks. Here are some examples:

  • You want to see the entire url, not just the stem. This is very helpful when you have subdomains. But when it gets written like site.mydomain.com/index.html, the overlay breaks
  • You want to rewrite your urls so that you can see them ALL by page title. Do the rewrite, the overlay breaks.
  • You rewrite your pages so that they pass a value to urchinTracker in the old Google Analytics, or to trackPageview in the new Google Analytics. Now you have a nice friendly name, but oops! your site overlay is broken again.

We can get around some of those problems by having a profile with no rewriting. But when you do the rewrite in the code (like passing values to the urchinTracker / trackPageview example), that isn’t an option. And still you have the problem of not differentiating links among pages. So I never find any use for the overlay (and am curious to learn about who does….)

Share and Enjoy:
  • Print
  • email
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Facebook
  • Twitter

Three Common Troubles with the New GATC


There are always a few problems when you’re doing something brand new. I’d like to quickly outline a few of the issues we have found while working with the new GATC. Two of the three issues listed here are merely a result of a documentation error on Google’s support site. I’m sure it will be quickly resolved, but until then you should avoid pasting this code directly into your webpages.

 

Smart Quotes

The first problem is the use of directional quotes (smart quotes) in the code that Google asks you to copy onto your webpages. These are the quotes that face one direction at the beginning of a quote and the other direction at the end of a quote. It is an easy oversight to make, but web browsers are not so forgiving. Whenever you see this type of quotes, make sure you overwrite them with straight quotes in an application such as Notepad before using the code on your website.3 problems

 

Dynamic http/https handling

Dynamically handling either an http or https version is a great idea, I really liked seeing it in the new GATC. However, it has been suggested a few times that this code doesn’t fully comply with XHTML standards, which can cause some problems. Replacing the dynamic code with a reference to just one version or the other should work just fine until things get sorted out. For Example:

<script type=”text/javascript” src=”http://www.google-analytics.com/ga.js”></script>

Wrong Function

During development, names of functions and variables can change and it’s hard to be sure every change propagates to every document. The function _trackVisit() doesn’t actually exist in the ga.js. So,instead of

        pageTracker._trackVisit();

use

 	pageTracker._trackPageview();
 

and you’ll be fine.

 

The End (for now)

I’d like to note that all of these issues have already been addressed in the Google Analytics Help Group by several people, including ShoreTel whose patience in answering the same questions over and over deserves some recognition.

Share and Enjoy:
  • Print
  • email
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Facebook
  • Twitter

Google Analytics Site Search with Custom Search Engine

“Why isn’t my Custom Search Engine working with Site Search?”

Since I had never used Google’s Custom Search Engine before (shame on me), my answer was:

“Gee, I don’t know, let’s look at the instructions.”

But the instructions were nowhere to be found. The truth is, it’s so easy, you just might miss it.

So I took a look. Site Search was turned on. Check. The Custom Search Engine script was on the page. Check. Results are being displayed. Check.

So what was the problem?
Custom Search Engine
I didn’t notice it at first. The results were being hosted on Google.

In order for site search data to be processed by Google Analytics, you need to bring them back to your site. So in your CSE control panel, under Code, make sure you selelct the iframe option and follow the instructions provided (which, as usual, just involves copying and pasting a little bit of JavaScript.)

Now, at this point you might ask “What the heck is an iframe and how do I do it?”

It is just the term that describes the technique used by Google to get their search results inside your page. Don’t be afraid. There isn’t any additional iframe-related implementation that you have to do.

Oh, and make sure that the new page you create for the results is also tagged with your GATC (Google Analytics Tracking Code.)

That’s it. See, I told you it was easy.

Share and Enjoy:
  • Print
  • email
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Facebook
  • Twitter

How To Identify Query Parameters With Google Analytics

Tired of seeing “other” in your Top Content report? How about knowing how many times a page was viewed without having to wade through query parameters? If you’ve had enough of irrelevant query parameters making garbage of your Top Content report, read on!

When analyzing a website, it’s often helpful to view the core pages of the site
without being distracted by the query parameters. Identifying all of the parameters
also allows you to figure out which ones can be excluded. Thus reducing erroneous
pageviews.

Note: This post refers to Google Analytics, but the macro would work with any similarly-formatted
spreadsheet.

Why do I need a macro to identify the parameters? Why can’t I just use
a regular expression, \?, to find all pages in the Top Content report that contain
a question mark, and pull the parameters by hand?

If you have 10 or 20 pages with 4 or 5 parameters, this might be fine. However,
we’ve seen some sites with 80,000 unique pages that contain a question mark.
This would be a bit tedious to do by hand.

Step 1: Get the Macro

You can download the macro here as a .bas file. (findParameters.bas)

The macro has been tested in Office 2003 and 2007.

I would love to rewrite the details on how to install the macro, but Jeremy Aube
at ROI Revolution did such a great job, I’m compelled to point you there. (Instructions)

(Where he refers to Conversion.bas, replace that with
findParameters.bas)

This step is much more involved than I’m giving it credit for here. If you have trouble
installing the macro, leave me a comment and I’ll add more details to this post.

Step 2: Export your Data

2.1: Go to your Top Content report.

2.2: If you have this many, change the drop down box to show 500 rows.

(Yes. Unfortunately, GA only exports the data being viewed.)

2.3: Next, click Export, then CSV

2.4: Save the file, or Open it in Excel

Step 3: Prepare the Spreadsheet

- Basically, just get rid of everything but the URLs.

3.1: Delete all of the rows down to the headers above the list of URLs

- For a month of data, this should be around row 47.

- Select the rows above the headings, right-click, and select Delete.

3.2: Do the same for columns B through G (All columns after “A”)

When finished, your sheet should look something like this:

Step 4: Run the Macro

If you followed Jeremy’s instructions perfectly, you should have a button that you
can push to run the macro. Click that. *after reading the warnings below*

However, if you took a shortcut and just installed the macro, you’ll need to find
and run it manually:

- Press Alt+F8 to bring up your list of macros.

- Select “ExtractParameters”, and click “Run”

It will take about 1 minute to run.
When finished, you’ll have a new sheet named “Parameters” which will contain a list
of all unique parameters found.

Notes and Warnings:

  • The portion of the macro which eliminates duplicate parameters takes about 1
    minute to run. Your screen may flicker while this is happening. Don’t
    try to use Excel during this time, lest you wish to visit the task manager.
  • The macro will work with up to 500 urls (technically rows 1-505). If you have
    80,000, I recommend you create a new profile that excludes all the parameters identified
    here. Wait, and repeat after new data, and possibly more parameters, have
    been collected. It took me 3 rounds to get all parameters from this example.
  • There must only be 1 sheet in your workbook.

I look forward to everyones’ comments (and criticism). This is my first of
what I hope to be many more posts to the LunaMetrics blog.

- Jason Green

Share and Enjoy:
  • Print
  • email
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Facebook
  • Twitter

Reading Reports in GA: Loyalty

I really, really had no idea how to read the GA Loyalty report.

So, once again, I did some testing (including just myself in a profile) and learned, this time, how Loyalty works. (Want to learn how to read the recency chart? I wrote about that one last week.) I learned a few important issues wrt Loyalty:

Like the Recency Chart, Loyalty is about visits, not unique visitors.

Grab your calculator again, and add up all the visits in the loyalty chart; you will see that they match the number of visits in Visitors > Visitor trending > Visits. For every visit in the period, there is a visit on the chart.

The Loyalty chart will measure the visitor’s visits as far back as there are cookies on the visitor’s browser.

It doesn’t matter that old visits are outside of the period. This one is hard to understand immediately, so I will show you a picture. Those of you who read my post on understanding the Recency chart know that I had 16 visits between November 13 and November 22, and I was the only visitor in the profile (and if you didn’t read the post, you can glance at the chart really quickly.) I didn’t clear my cookies before creating this new profile, and of course, I was the only person in the profile. Imagine my surprise when I looked at the loyalty for that period:

Loyalty - Robbin and Luna

In retrospect, this makes perfect sense. I did this analysis on the LunaMetrics site, and I visit it all the time, especially when I am blogging. So I had cookies on my computer that showed the hundreds of times I had been there, and GA put all of my visits into the top category, 201+.

GA does not aggregate an individual visitor’s visits.

This might seem counterintuitive. After all, we just looked at my sixteen visits getting aggregated into the 201+ category, right?

Well, that is an illusion. For each visit, GA computes how many times the visitor has already been to the site. I have been to the LunaMetrics site many hundreds of times, so these might be visits 3001,3002,3003… etc. But the top category is 201+, and that’s the only place GA can put them.

So let’s look at an experiment where I did clear my cookies first. Here, I had six visits between my start date, 11/18 and 12/4: Loyalty with cookies cleared

Eye opening, isn’t it? Notice that every time I visit, the Loyalty chart puts my visit into a new “bucket.” (There are two visits with a loyalty of 1 time, because GA thinks that I am two different visitors and doesn’t know how to show that I visited six times. The visitor dashboard even says: six visits, two unique visitors. Web analytics are not perfect. Sorry.)

The Loyalty Chart is quite useful.

Unlike Recency (which you can make a little useful, but is still a really, really hard chart to work with), Loyalty is really meaningful. If you are an e-commerce site with a ton of one-time visits (which is what I see a lot), then you need to look at your e-commerce menu and see if your “visits to purchase” number is very high. If it is, congratulations – maybe they come only once, but they buy. On the other hand, if your visits-to-purchase is low, and you have a *lot* of one-time visits, you need to start digging deeper.

And if you are a content site, like Facebook, oh wow! A high number of one-time visits really does show low engagement with the site (or maybe it’s about growth – you’ve got all sorts of new members, but you’ll know that from your back end.) Facebook and their sisters should be looking for a graph with lots of those 100-249 and 201+ visits.

Note: GA has updated their “about this report” descriptions (found in the lower left of every report). Go check that out, and congratulations, GA, on a great usability fix.

In closing, let me just get down on my knees and beg the Google Analytics Product Manager to rename this chart: Can’t we call it “Frequency”?

Share and Enjoy:
  • Print
  • email
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Facebook
  • Twitter

Reading reports in Google Analytics: Recency

Do you know how to read the recency report in Google Analytics? I sure didn’t. So I reverse engineered it — and here, come learn with me what it’s all about when they say, “Most people visited your site 0 days ago…”

Methodology. All great scientific experiments start with a boring chapter on methodology. (Right?) So here is mine: In order to test, I created a number of profiles where my home computer was the only “person” in the profile. Then, I was able to learn how GA computed recency when there was only one unique visitor, and where I knew exactly when she (that’s me!) had visited, and if she had wiped her cookies.

Here is what I learned:

Recency is about visits, not visitors.

When the report says, “Most people visited 1 day ago” — that’s just a typo. The report isn’t about people, or unique visitors. It is about visits. If you have any doubt, look at the column with the numbers in it. It says, “visits.” Then, whip out your calculator, add them up, and without changing the calendar, head on over to the Visitor > Visit Trending > Visits report. If they aren’t the same number, then comment here. Send me email. Call me on my cell phone.

I want to say this a different way. If you have 100 visits in the time period, there will be exactly 100 visits in the recency chart. Even if they all come from the same person’s computer.

Recency computes time (in seconds) between each visit from the same visitor. If the time between visits is less than 24 hours, it will show up as a Zero Days Ago visit.

Before I explain this one, let me show you the results of one of my tests. It will make it easier to explain.

recency-excel-luna.jpgWithout wiping my cookies, I set up a new profile for the LunaMetrics website, and created a user defined variable that had only myself in it. Then I visited. Here is when I visited — you can see the 24 hour clock down the left margin.

Now, I will take you on a tour of all these visits. At some level, this is incredibly boring, like all good scientific experiments. (I’m sorry. The truth is that I don’t have the definitive word on recency, so the best I can do is show you the evidence. Sort of like CSI.)

OK, for those of you who are still with me: All the visits that aren’t in a colored block had a visit right before it that was less than 24 hours earlier. So, for example, on November 16, I only visited once, at 7 am, but the visit before it was on the 15th at 19:00 — only about 10 hours earlier. Every single one of these non-colored visits will get a notch in the zero days ago category. (Right? If recency is time between visits, and there are only 10 hours between two visits, they are less than a day apart, so the earlier visit gets classified as zero days before the later visit.)

But what about those visits in the colored blocks? Let’s start with the two visits at 9 am on the 22nd (orange). I visited twice in one hour. One visit was probably 45 minutes or so before the other — clearly less than 24 hours before it, and it shows up as zero days. The other orange visit was preceded by the green visit. Notice that there are more than 24 hours between the one in green and the one in orange. So now we have a visit in the 1 Day Ago category.

Now look at Yellow, on the 17th. This is just like Orange: two visits in one hour, one of them clearly less than 24 hours before the other, and the other, more than 24 hours ago. Another 1 Day Ago visit.

OK, we will turn our eyes (if we haven’t gone to sleep yet) to Green on the 20th at 18:00 (6 pm). I didn’t even visit the day before. The prior visit was MORE THAN 48 HOURS before it. So that one will show up as Two Days Ago. (Go team!)

And finally, the first box, in blue. I don’t have records for when I visited before this date — I just started this profile on the day that I started the test, but I didn’t clear my cookies. This part is very important: The recency chart cares about visits outside the time you picked, as long as they are affiliated with a visit that is inside the time period. For example: If my most recent visit before the very first one, i.e. the blue one, had been 7 days ago, it would show up in the 7 day bar, even though that is outside the time period.

OK, let’s summarize. Of the 16 times in this period I visited, 12 of them had a prior visit that was less than 24 hours before it (0 days ago), two (an orange and a yellow) had a prior visit that was just over 24 hours before (1 day ago ), one had a prior visit that was two days ago (the green one) and one of them (the blue one) is in the “I’m not sure” category.

So if I pull the recency chart for the period of November 13-22, here is what it looks like:

recency-lunametrics2.jpg

 

So in this ten day period, we had one person (me) visit 16 times, and most of those visits were preceded by a more recent visit that took place less than one day before it. That’s what they mean when they say, “Most people last visited: 0 days ago.”

And moving right along: Very frequent visits are in the same zero days bucket with new visits. This is bad.

I set up about five different tests. Here is a different one that I set up on November 14. This time, I cleared all the necessary cookies, so that GA would think I had never been there before, but would still know to measure only me — and I visited on November 14, but not on the 15th or 16th:

recency-no-cookies2.jpg

The reason this is bad is that GA throws together visitors who visit the site often with visitors who are new. A content site might find that repeat customers are more likely to continue repeating (so they are the best visitors) and that new visitors may come back or bail (so they are question marks.) Those aren’t two categories we really want to combine.

So here are the takeaways and “to do’s” :

  • If you care about recency, create a returning visitors profile by using a filter to exclude new visitors (Need to learn how to create a custom filter?). If you see lots of visits in 0 days ago in this Returning Visitors profile, you are seeing visits from visitors who come back quickly. In fact, this chart is pretty hard to read, so the more you segment, the more you will learn.
  • Forget the line that says, “Most people last visited.” Just read the report and come to your own conclusions.

Let me close with two thoughts:

  1. I can’t stress enough how every visit during the period gets a matching visit that is the one that came just before it.
  2. I can’t stress enough how this is just my experiment. Go ahead, create your own. Prove me wrong. I would love to see it.

Whew. This took a long, long time to do. Many thanks to everyone who tried to help, even if I didn’t listen to a word you had to say, in my usual maverick fashion…

Share and Enjoy:
  • Print
  • email
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Facebook
  • Twitter

The US National Guard makes a mess of conversion

“I really want to download that song,” my anti-war teenager whispered to me in the darkened theater. We were watching the (almost mandatory) music video about the National Guard that is showing here in the US on every screen, before every movie, it seems.

“Don’t you care that it’s about the US military?” I whispered back, incredulously.

“No,” she whispered in reply, “I just care that 3 Doors Down did it.”

Today is the end of the holiday weekend, and as she was getting ready to go back to school, I asked her if she had downloaded it. “I didn’t,” she answered, “They wanted my name and my email address. I’m just the right age, I’m sure they’ll try to recruit me. I’ll get a ton of spam from them.” I pointed out that she could easily just create an alternative email account and not worry about the spam. Which is exactly what she did.

The National Guard is really foolish. They have spent an incredible amount of money getting a truly great music video on movie screens nationwide. But instead of putting a wall in front of it (stopping lots and lots of people), they should give it away without asking for names. And they should make not just the music, but also the video, available for download (I only found the streaming video available.) It’s a great recruiting piece, and instead of stopping the conversion, they should let people take it and watch it and watch it. Isn’t that what you want, all your potential customers putting your advertising on their iPods? The US National Guard has that opportunity, but left as it is – email address required – lots of people will just leave the page (I’d like to see that page’s exit rate – I notice that they use Google Analytics), and plenty of others will just use an alternate address. One they will never look at again.

Now, that would make a great split test – because all that should matter is whether they get enough recruits…

Share and Enjoy:
  • Print
  • email
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Facebook
  • Twitter
Feedback Form