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

Should You Offer a Mobile Version of Your Site?

Mobile Sites: Yea or Nay?

Before smartphones came along, mobile websites were all the rage: they allowed users to access sites on a mobile device in a quicker, more efficient manner. The font and the layout were all designed to fit onto a small screen. The page loaded quickly because there wasn’t all the extra stuff you get on a regular site.

Now that’s all changed because smartphones are essentially computers you carry around in your pocket.

But there is still a case to be made for having a mobile site.

Deadspin has one, the NYTimes has one, and even The Writer’s Coin (ahem!) has one.

The idea is to serve up your content in the most convenient way possible, depending on how users are trying to access your site.

Do You Really Need a Mobile Site?

I say yes: pretty soon everyone will have phones that are just as powerful as their home computers, so the easier you make it for them to access your site, the better.

But if you need proof, go to your analytics report. How many iPhone/Android users are coming to the site?

Analytics Report for Mobile
You can get to this report from the Visitors->Mobile->Mobile Devices menu.

What we’re looking at here is (over the past 30 days):

  • How many overall visits come from mobile devices?
  • What percent of overall traffic comes from mobile devices? In this case, it’s 2.25%
  • Which devices are accessing the site?

This is a great example because 2.25% isn’t a lot, but it’s not insignificant. What we’re trying to figure out is if it’s worth the effort to build a mobile site for the amount of users you’re getting that are on these devices.

Even more interesting: trend this out over a longer period of time. What’s the trend? In my case, mobile traffic is going up…way up:

And even though the iPad is leading the way (which is interesting and worth digging into separately, demgraphic-wise), I still wanted a dedicated mobile site.

What Did I Do?

I’m a one-man operation so I needed an easy solution I could implement myself. That was cheap (free). So I looked around on other sites and the WordPress plugin I kept seeing was WPTouch. It’s great, gives you tons of options, and doesn’t get in the way of what users are after: your content.

Here’s what The Writer’s Coin looks like on a mobile device:

TWC Mobile

It literally took me about 20 minutes to get this going with all the options I wanted/needed. So if you’re on WordPress and your analytics report tells you your mobile traffic is increasing, I see no reason not to go ahead and give the people what they want.

Don’t forget to add your Google Analytics tracking code to the Settings area of WPTouch! Otherwise you’ll lose tracking on all those pages and it’ll look like your traffic is actually going down.

Image by Johan Larsson

Leave a Comment

First Thing’s First: The Importance of SEO

SEO graphic

I have a confession to make: learning about analytics isn’t very exciting. There are some very cool things you can do once you know the basics and can dig around an Analytics report—but for the most part I’m guess most people react to analytics with a dismissive “eh.”

Which is fine—I understand. It’s one of those things that’s hard to get excited about until you see for yourself the kind of cool data you can get from it.

SEO, on the other hand, is something everyone gets excited about. After all, SEO means more traffic and that’s always exciting.

I’ve neglected to cover the basics of optimizing a website, and it all starts with SEO. So I’m going to do a better job of covering SEO-related topics because you can’t really get a lot of value out of analytics reports if you only have 5 or 10 people visiting your site.

First you get the traffic.

Then you get the analytics.

Then you get the power.

Or something like that.

So get ready to see some basic SEO posts here at Applied Analytics so you can start driving some organic traffic (a term that I’ll talk more about) to your site(s). Once we start a flow of traffic coming to your site we can begin to apply the magic of analytics and learn some cool stuff about the people that are showing up.

You can also get started by checking out the links on the sidebar: Copyblogger’s SEO Guide and the Google Analytics SEO Handbook.

Image by smemon87

Comments (1)

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

Comments (1)

What Kind of People are Coming to my Site?

people crowd

When you own a website that you put a lot of work into, you’re probably curious about who is visiting it. You’d like to know what their favorite colors are, how much money they make, and how much of it they’re willing to hand over to you.

I can’t really help you there, and neither can Google Analytics.

But Google Analytics does do a good job of grouping people into neat groups, and that can tell you quite a bit about who they are and what they’re looking for and how you can target them.

They are:

  1. Referral Traffic: This is probably where you’ll start getting the first visitors to your site. Referral traffic occurs when one website links to your site and someone clicks on that link. Think of referral traffic as an endorsement—being as we are in an election year. When one candidate (who has a lot of supporters) goes up on the lectern and decides to endorse another, lesser-known candidate that is up for election, the goal is to get some of those followers to vote for this new guy.
    Same thing with your site: when another site links to you they’re basically saying to their readers “I support this candidate.” Which is great because when you’re starting out nobody knows you and getting endorsements from sites with traffic is a great way of getting people to your own site.
  2. Search Traffic: You’ve probably heard a lot about this one. I’m sure you’ve heard words like SEO, Google, and PageRank. Let’s not worry about all of that just yet. All you need to know now is that this type of traffic got to your site by searching for something in a search engine and your site came up somewhere in the results. The user felt it was relevant enough and they went ahead and clicked on it. The best part bout this traffic is that it’s free and requires very little continuous work on your part. If you’re a photographer in New York that takes pictures of infants and you specialize in black and white portraits, ideally you’re showing up when someone searches for “black and white kids portrait nyc.” There are tons of things you can do to help with how high up you rank on a search, but that’s for a later post. If you want to read more on SEO, you can check out the guides on the right or you can read the post on Off Page SEO, which incidentally has a lot to do with referral traffic.
  3. Direct Traffic: This is traffic that comes straight to your site. Someone either typed in your URL into their address bar or they clicked on a bookmark to get to your site. Either way, this tells us a few things about this kind of visitor: a) they already know about your site and b) they went straight to it without any help from a search engine or endorsement from another site. This won’t be very high at first (as long as you’ve blocked yourself from your Analytics!) because nobody knows about you or your site. And if your site’s URL is something wacky like www.plsecomeandvisitpleeeaaaase.com then good luck getting any traffic at all, especially of the direct variety.
  4. Other: Ah, the catch-all, ambiguous bucket known as “other.” What’s included here? Everything else, obviously, but to be a little more specific let’s mention e-mail. You may not have an email list or send any email to people, but you may eventually, and this is where it would show up. Also, if you’ve placed your URL in the signature of your email client and you send a lot of email, you might see a trickle come in through here. Whenever someone clicks on a link to your site from their Yahoo, G-Mail, Outlook, etc., then this is where the traffic will be logged.

The reason I ordered these sections as I did was because that’s pretty much how you should expect to see the traffic come in when you first start out. Hopefully you’re out there networking with other sites or people who have sites that are relevant to yours and they like your site enough to endorse you.

And if you have friends with totally unrelated websites, feel free to go ahead and ask them to mention your site, along with the ever-important link. The traffic isn’t as important (especially since it won’t be relevant to all those visitors), but the link is. We’ll cover this later, but links are the currency of the web, and the more you have, the better your site will be viewed by search engines like Google.

After all, the more quality endorsements a candidate has, the better his/her odds are of winning an election.

On a future post we’ll look at how to go beyond counting how many people from each group you’re getting and starting digging into some of the deeper stuff like whether or not the traffic is relevant to your site. The last thing you want to do is drive a ton of pottery fanatics to your photography site…unless you can create a cool angle that makes it relevant to them.

How to Take Awesome Pottery Pictures?

Anything’s possible.

Image by TheBigTouffe

Leave a Comment