Archive for Google Analytics Tips

Filtering Yourself Out of Google Analytics

As you make changes and test different things on your site, you and the people you work with will inevitably wind up visiting your own site.

A lot.

And that means Google Analytics is count you along with the rest of your users. Not a big deal if you have thousands and thousands of visitors (though it’s still not ideal), but it sucks if you are just starting out.

Your browsing is going to skew the precious data that you want to use to make better decisions about your site. You want your data to be accurate.

The solution? You must filter yourself out of Google Analytics.

There are two common ways to do it:

  • By IP address
  • Via a cookie

I’m going to focus on the one I think is most useful to all of you: the cookie method. Cookies are simply tiny files that are used to convey information to your web browser.

What I will walk you through in this post is how to set up a cookie that allows your website to identify you and not count you in the Google Analytics data.

Step One: Setting the Cookie

Here is what you need to do:

Create a new page on your site

This is pretty easy. Just go to an existing page, right click on it and hit “View Source.” Copy all this code and paste it into Notepad (or better yet, Notepad++), then save this as a new HTML file. Done.

Make sure it has Google Analytics code on it just like all the other pages

If you used the method I just described, the code should be on there, but make sure to double check. Oh and please use the new asynchronous code…otherwise this won’t work right.

Add one line of code to it

Look for these two lines of Google Analytics code on your page:

_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
_gaq.push(['_trackPageview']);

Now just add this new line of code:

_gaq.push(['_setVar','pickaname']);

Where pickaname is something you pick. This is what it should look like after you’re done:

_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
_gaq.push(['_setVar','boomgoesthedynamite']);
_gaq.push(['_trackPageview']);

Upload to your server

Use whatever FTP client you want to push this new file onto your server.

Visit the page

If the file you saved in the first step was called “monkeytime.html” then you should go to yourdomain.com/monkeytime.html. You should see the page you created in step one.

Visiting the page will set the cookie on your computer—you should visit this page from any computer you want to block from the Analytics report.

If you want to double check that it worked, check your cookies in your browser and in your domain—you should see one called _utmv. Click on it and you should see the unique name you gave it (boomgoesthedynamite) in the information for that cookie.

Step Two: Creating a Filter in Google Analytics

Now that you’ve set the cookie, we have to tell Google Analytics to look for it and to throw out any visits from people with that cookie on their machines. Go to the Edit section of the profile you want to create a filter for:

analytics edit button

Then click on the Add Filter button:

Enter the following information into the filter:

  • Add new Filter for Profile
  • Give your filter a name (be descriptive!)
  • Filter Type: Exclude
  • Filter Field: User Defined
  • Filter Pattern: Enter the unique name you added to the code in Step One (boomgoesthedynamite)

That’s it! Testing this is tricky, but if you can find a page on your site that gets zero traffic (like maybe the cookie page you just created…) and visit it repeatedly, you should be able to figure out if you’re being counted or not.

If you’ll be blocking a lot of people (co-workers, etc.) using this method, make sure you tell Analytics to not count that cookie page either. It’s not a big deal and it shouldn’t impact your reports that much, but if you want to be precise you should go ahead and block it with a filter that looks like this:

Image by Gabe Photos

Leave a Comment

What Happened? Explaining Traffic Spikes with Google Analytics

question mark man

People are naturally curious. And when you’re running your own site, you become even more so. Is this working? Do people like this button? Would they like it better if it was a different color?

Questions are around every corner and rarely do we find any answers. Which is frustrating since there are no easy questions.

When you’re looking at traffic data in Google Analytics, you’ll find yourself asking the same question over and over again: why did that happen?

Whether it’s a traffic spike or the bounce rate suddenly shooting up, you’ll see something in a chart and get that curious urge to know why.

annotations in google analytics

Thanks to analytics (and the information on this site…I hope), you can find good answers to all your questions about traffic spikes and changes in patterns. The data is all there—you just have to know how to get to it and how to interpret it.

That’s the whole point of this site—to help you learn how to use all the tools that in Google Analytics to do some detective work and figure these things out.

But once you do figure it out, why not leave yourself a note so you can always see it in the future?

Annotations

Google Analytics allows you to add a small annotation to your charts so you can easily add the “why” so you (and anyone else with access to your account) can see what caused it.

Let’s say the source of the spike in your chart was caused by David Hasselhoff re tweeting you and exposing all his followers to your site. Great news! You can create an annotation to commemorate this blessed event!

Here’s how:

Click down arrow

1. Click on the down arrow below a chart.

Create new annotation

2. A small window should expand. Click on the Create new annotation.

Enter annotation

3. Enter the date and any text you want that’ll remind you of what happened on that day.

Final look

4. And now you’re done! The next time you’re looking at that date in your Analytics, you’ll see a small bubble that indicates an annotation. You can check it out by clicking on the down arrow in step 1.

Image by Marco Bellucci

Leave a Comment

Three Steps to Improving Your Site


  1. Write: Write down the top three questions you have about your site. Something you want to know, something that bothers you, something you want to improve—whatever it is. But write down three specific questions whose answers would help you make your site a better, more effective place.
  2. Ask: Send those questions to me by email or via the form at the bottom of this post.
  3. Wait: I’ll get back to you and we’ll get to the bottom of these questions together.

Pretty straightforward, right? What are you waiting for?

(required)
(required)

 

Image by Steve Keys

Leave a Comment

Measuring Daily Trends in Google Analytics

Let’s get real: we live in a NOW society. We want to check our e-mail now, we want you to text back now, and we want to find out how our traffic is doing now.

Bad news: Google Analytics isn’t in real-time. That means there is a lag between when a user does something on your site and when you see the data in Google Analytics. It’s around two hours but it’s not a fixed time period and sometimes GA falls behind, then catches up, etc. They typically recommend letting data sit for at least 24 hours before considering it “solid.”

But you don’t care about that, you want to know how your day is going so far. Now. Up to the minute. Here’s how you can do that.

Applying It

Last week I showed you how to use a nifty little feature in Google Analytics that lets you compare two different time periods. Today I want to take a closer look at how you can use that tool to reveal some pretty interesting things about your site.

From your dashboard, select today for your date range and then click on the “Compare to Past” checkbox we talked about last week. Now select yesterday or the day you want to compare to. Then hit apply.

daily trend in google analytics

Done? Doesn’t look all that special, does it? Well, it may not look like much but there’s some good comparative data there. But you want more, dont’ you? You greedy child of the NOW. So I’m going to give it to you.

Click on Visits right underneath your chart (under Site Usage). Now you’ll see a new button that wasn’t there before that allows you to graph by the hour:

hourly graph in google analytics

hourly trend google analytics

Now you can see how today compared with another day on an hour to hour basis. This is useful if you’re testing things like:

  • Posting more often than you usually do
  • Posting at different times throughout the day
  • If a big blogger linked to you, what kind of impact did it have and when did it start?

Pretty cool, right? And don’t forget that from this view you can select any of the segments you want from the top right (like new visitors, returning visitors, etc.) to get even deeper and more specific into how the day was flowing.

Enjoy! And don’t forget that this data can change if one of the days you’re looking at is today. So I recommend waiting until tomorrow so you can trust your data.

Leave a Comment

Using Google Analytics to Compare Data from Two Different Time Periods

Ever wonder how your traffic is doing this week compared to last week? Or this month compared to last month? Of course you do! That’s the whole reason you installed Google Analytics and are even reading this post: you want to know what your visitors are doing, why they’re doing it, and how they’re changing what they’re doing.

When I first started using Google Analytics, here’s how I compared one time period to another:

analytics time periods1

First I would select a time period of two weeks (from Sunday to Saturday). Then I would hit the “Graph by” button and change it to “Week.”

analytics time periods2

The resulting view gave me a quick look at whether I was up or down from last week:

analytics time periods3

Each one of those two dots represents a week and on the chart you can see that visits were down a little bit.

Other than that, it’s a pretty boring line, isn’t it? Nothing very interesting and it certainly doesn’t answer any interesting questions.

Then I discovered the proper way of looking at this kind of data and I flipped out—I had been doing it wrong and I felt kind of dumb. Here’s the right way of doing it:

First select the time period you want and then click on “Compare to Past:”

analytics time periods4

Now you’ll see another pair of boxes pop up and your chart will show some green. This is where you select a totally different time period. The result will show both time periods on the same chart with different color lines:

analytics time periods5

Pretty cool right? Well that’s just the beginning—now you drill down by any metric you want from this view. Want to see how a specific keyword did during the two time periods? Just find the keyword in the Traffic Sources section (or your handy-dandy Dashboard) and voilá.

Not only that, you get to see all the related metrics like bounce rate and time on site for both of the time periods…on the same page!

analytics time periods6

This is a great way at looking at the data that you think is most important. Whether that’s conversions or visits or anything else, knowing how your key metrics are trending from one time period to the next is crucial.

Comments (2)