Archive for the ‘Web Analytics’ Category

Where Should The Google Analytics Tracking Code Be Placed?

Before I even start talking about this, let’s go to code.google.com for the official recommendation on where someone should place their Tracking Code on their webpages…

The Analytics snippet is a small piece of JavaScript code that you paste into your pages. It activates Google Analytics tracking by inserting ga.js into the page. To use this on your pages, copy the code snippet below, replacing UA-XXXXX-X with your web property ID. Paste this snippet into your website template page so that it appears before the closing </head> tag.

Google Analytics Asynchronous Tracking Code

The Google Analytics Asynchronous Tracking Code

Ok! Thanks for reading, see you next time!

Just kidding, of course it’s not that simple.

So seriously, where should I put my Google Tracking Code?

We actually get people asking us about this a lot. It’s one of the first items in our audits that we look at. What version of the tracking code are you using, and where is it on the page. There are plenty of variations, but the most common one if it’s not completely up to date, is having non-Asynchronous (or ‘traditional’) tracking code, which is placed at the bottom of the page.  So when the first item in our audit says “We recommend you update to the Asynchronous tracking code, and move it’s placement into the <head> of your document, rather than at the end of the <body>” people get worried.

Is it bad to have the Google Tracking Code at the bottom of the page? I read that you should put it there at the bottom, rather than up in the head because it makes your site faster.

Headless fish bodies

Should you place the tracking code in the <body>?

The quick and dirty answer is that yes it’s safe to put the new code really anywhere on the page, and for 99% of users, you’ll want to use the Asynchronous code and put it in the head of your document. There are a few exceptions/alterations which I’ll note in a minute.

The less quick part of that answer is that it WAS bad to put the traditional Google Tracking Code in the head of your webpage in the past, so if you read some book or blog purporting to speed up your website extolling the virtues of putting the Google code at the bottom of the page, then they may have been correct once, but they aren’t anymore. The speed of the internet, and all that jazz.

Google released the Asynchronous Tracking code on December 1st, 2009. Prior to that point all we had was the traditional code, and it worked like most other basic JavaScript code. That is to say that it would go one line at a time. So when your browser loaded up a line of code, it would load that line only, and then wait till that line was fully loaded. Then, and only then, would it move to the next line, and then load that line, etc. Like a single conveyor belt. The problem with that design though, is that if you ran into a snag the entire page would hang. So if the Google Tracking Code back then was placed at the top of your webpage in the head of the document, then the speed your site loaded was partly determined by how quickly Google sent you that code. If it took Google 10 seconds to send you that code, that was 10 more seconds your visitor had to wait to view the page. That’s why it was recommended to put that code at the very bottom of the page. That way if it stalled in loading the files from Google, at least your page was loaded first.

The Asynchronous code though works differently. Rather than say a SINGLE conveyor belt, now there are multiple ones, and the rest of your page can load up regardless of how long it takes to retrieve data from Google. The tracking code loads up on its own conveyor, while the rest of your site loads on another.

And on top of that the Asynchronous code is designed to be downloaded only once from Google, and then it’s served from your cache (i.e. it’s saved on your computer and you won’t have to download it again), which makes it that much faster.

You lost me poindexter, what does that mean for me?

It means the asynchronous tracking code averages a 5% improvement in tracking data, with some sites showing 10 and even 20% improvement in their data. If you use Adwords, it closes in on 100% accuracy with the asynchronous code.

The asynchronous code is faster, and therefore you get better more accurate numbers as to how many people are actually visiting your site.

What if I have events or things happening on the page, where I need to record user actions, and the tracking code hasn’t loaded yet?

Well, that problem would also happen if you had the non-async code firing at the bottom of the page, but with async it’s much better. Even if it takes time to load the ga.js file from Google, it’s already set up the tracking variables on the page, and will store the events you perform before the actual file is loaded. Once the file loads, then all the events backlogged will be sent to Google. It’s not PERFECT, but for the most part it will capture events that happen prior to the Google tracking code has even finished loading, and send them after the code has been loaded.

So do I need to move it to the head of all my pages? I have a lot of pages, and that’ll take a lot of time.

Fish heads

You can put your tracking code anywhere, but it's better in the <head>

Nope. You can put it anywhere you want really, and It’ll run anywhere on the page whether it’s in the head or the body.  It’s recommended you put it in the head though, so it can be as accurate as possible.

You see, the Pageview is recorded only after that code is loaded up. So the sooner you load the code, the sooner that Pageview is recorded. Let’s say you have a big blog page, and it’s a slow loading one, taking even 10 to 20 seconds to load everything up. If your Google Code doesn’t start until the end of the page, it can get held up, just like the old non-asynchronous code used to hold up OTHER lines of code. Except now it’s holding up the tracking code. If a visitor to your site hits the page, and then leaves it before the tracking code fires the Pageview, then you lose that visitor. They now become a new direct visit to whatever page of the site they landed on. This can make all sorts of data on your site incorrect.

So it’s best practices to use the Asynchronous code in the head of your page, it won’t slow down the rest of your page from loading, and by having it there it won’t GET slowed down by the rest of the webpage either, so it’ll fire sooner, and you’ll get a more accurate count of what pages your visitors visit.

So what are the exceptions? When is it BAD to run the tracking code up in the head?

I mentioned before that there ARE a few exceptions. One is if you’re setting custom variables on the page.

If you set a Custom Variable on your webpage then it will essentially sit on your page, waiting for either a pageview to be tracked, or an event to be called. If you set a custom variable on a page and don’t track a page or an event after it, that custom variable will NOT get passed to Google. Sometimes you might not be tracking any events on a page, but you’ll want to set a custom variable. Because of how code is delivered, it’s possible that custom variable might only get generated AFTER the head document.  Usually a page can be coded so that these variables can be determined before the HTML is delivered and then you can have the custom variables created in the head of the document as well. Maybe it could theoretically be put in the head, but the developers didn’t build the page that way, and you’re not willing or able to have them redo everything. In those cases you can set a Custom Variable anywhere on the page, and then rather than tracking the pageview in the head of the document, you remove this line:

_gaq.push(['_trackPageview']);

from the Asynchronous code, and then insert it later in the page wherever you like, after the custom variables are set. That way the code loads up, it doesn’t interrupt the page load, and you can then track custom variables on the page itself anywhere they appear, as well as retaining the benefit of loading the tracking code early.

HOWEVER, this can also reduce accuracy, because if a user navigates away before that trackPageview is called, then you’re facing the same problems that the traditional code presented in the first place. Another option would be to use Event Tracking. An event being fired will also submit that queued custom variable, so you could fire an event tied to that custom variable. Essentially a throwaway event.

_gaq.push(['_setCustomVar',1, 'Status', 'Logged In']);
_gaq.push(['_trackEvent', 'Custom', 'PageLoad', 'Setting Logged In State',0,true]);

A couple notes on this:

First we’re setting the Custom Variable, we’re assigning it to key space 1 (of 5), and we’re calling it Status, and setting the value to Logged In. That’ll sit there until an Event or Pageview is tracked.

So we do the event. We set it to a Custom category group, we definte the action as PageLoad because a user isn’t specifically interacting with this event. Then we set the Label as to what the event is doing. We add a 0 to the value (you don’t have to add an actual value there if we’re not using it, but I’m personally uncomfortable passing nothing). We also then set the non-interaction value to true. This is also key if you use an event here. If you don’t set it as true, then the event is considered a page interaction, and it will affect your bounce rate from the landing page. Essentially rather than someone coming to your page looking at it and hitting the back button being considered a ‘bounce’ It would not be considered one because the user ‘interacted’ with the site. So we set this to true, so that isn’t considered in that respect.

But wait, I read something on Google’s own support pages that said I shouldn’t do this?

You mean this page?

Yeah, you don’t believe everything you read, do you? That’s old outdated support information.

So if we update is it going to change my data? Like am I all of a sudden going to see more pageviews or something?

It’s possible. It depends on your site, where the code was, what sort of speed and pageload times you have. By updating you should see the data you’re getting change, maybe a little, maybe a lot. But it’ll be MORE ACCURATE data. Here we tend to side with getting the data to be as accurate as possible, even if there is a bit of a break in the levels of reporting.

If I don’t update, will my site continue to track data?

Sure. It probably won’t be as accurate, but depending on your site it’s conceivable it’s not a huge data difference. The main functions are all loaded from the same place, the ga.js file. The main difference is how it loads, how fast it loads or is even cached in your browser, and therefore the accuracy of your data.

So what should I do?

If you’re NOT using the up to date Async code you should update to using that. You’ve really got to have some serious things going on to NOT update. Does it need to be in the head of the document? No, it won’t kill you to have it at the bottom of the page, but if you CAN move it to the top, then you should because it’ll be faster and more accurate. If you don’t know of a reason to keep using the non-async code at the bottom of the page, and you’re not using custom variables… Then really there is no reason to NOT update it and move it to the top of the page. You’ll have more accurate data, you’ll get newer and better tracking features, and more. Come on. Everyone’s doing it.

Measuring Sitelinks from your Google AdWords Campaigns

 

 

PPC experts know how important the ability to test and measure results is.  Thankfully, we have the ability to do this with sitelinks as well.  The ‘Ad Extensions’ tab within the Google AdWords UI offers advertisers data that is specific to sitelink performance.  Also, keep in mind that all of this data is rolled up when viewing data for the campaign overall – there’s no need to add the numbers together to get the total, as AdWords already displays the campaign data in that way.

One question I get often, however, is how advertisers can view more detailed data for sitelinks, such as conversion data or performance for individual sitelinks.  While we don’t have the ability to view this data within the AdWords UI, we can see it within Google Analytics.

Set up Tracking Parameters

In order to track in Analytics, you’ll first need to attach tracking parameters onto the URL of the sitelinks you are using.  I usually set mine up as sitelink = [description of sitelink here], so for example:

www.CompanyA.com/contactus?sitelink =contactus

Remember, when attaching tracking parameters to any URL, use ‘?’ to separate the URL from the tagging if the URL does not already have a question mark in it; if the URL already contains a question mark, you’ll want to separate your URL from your parameter with ‘&’ (even if the URL already contains an ampersand).  SearchEngineLand offers a great article on how to set up parameters.

View the Content Report

Once the parameters are in place and you have confirmed the link still works correctly, you can view data for sitelinks within Google Analytics by clicking on Content, followed by Site Content and then Landing Pages.  Search for your designated parameter in the search box.  From here, you can drill down in the Google Analytics interface to determine additional information about the sitelinks, such as which campaigns triggered them, etc.

 

Custom Reports

Another way to view sitelink performance within Analytics is to set up a custom report that will be saved within the analytics profile for quick viewing in the future.  To do so, you’ll need to ensure that tracking parameters have been set up for the sitelink URLs (discussed above).

Within the Google Analytics profile you wish to track sitelinks in, click on Custom Reporting, then New Custom Report.  Name the report so that you will be able to easily identify it as the Sitelinks report when you view the Custom Reporting tab (I always name mine Sitelinks Report).  Since my sitelinks report usually only has one tab, I just name it “Sitelinks.”  I also prefer to view the data by Explorer as the type.

 

Choose the metrics you would like to view for your sitelinks – this can be limited to just visits, or as many metrics as you’d like, including bounce rates, time on site, etc.  Metrics can be combined into one metrics group or multiple metric groups.  Name your groups something easily identifiable.

Next, you’ll choose the dimensions for which you’d like to see the sitelink data.  I normally like to view campaigns, ad groups, keyword and landing page data at the very least.  Note: Landing Page (Listed under Content) must be chosen for the custom report filter to work!  The dimensions you choose can be basic like this, or contain more detailed data such as ad slot position, day of the week, medium, etc.

You’ll then need to add a filter for the custom report to pull data for.  Click Add Filter, then click Content, Landing Page.  Ensure the first box says “Include.”  Click the drop down box that says “Exact,” and click on “Regex.”  Then, in the box to the right of that, type in the tracking parameter that you would like use to filter for sitelinks.  I set my custom reports to filter for the word “sitelink” within the landing page, because my parameter contains that word.

Click save, and you now have a Custom Report you can use to view sitelink information quickly.  You will only have to make the sitelink report one time, but you can always update it to view more/less data.

Here is what your completed Custom Report page might look like, before clicking Save:

 

Implement sitelinks in your Paid Search campaigns, and use the AdWords UI and Google Analytics to track their performance.

GoalCopy Updated for Firefox 9

If you’re not familiar with the Goal Copy Firefox extension, you can read the original post here.

It seems like everyone I know is using Chrome now. It’s fast, it’s simple, it has developer tools built right in. It’s a fantastic browser and it deserves every bit of browser share that it’s taking away from the Big Two (Firefox and IE).

That being said, I do almost all of my Google Analytics debugging in Firefox. I love HttpFox and you’ll pry Firebug (and, to a lesser extent, Firecookie) from my cold, dead hands. Maybe I’m just set in my ways, but it’s the way I do things, and while I love Chrome for everyday browsing, I do all my heavy lifting with the ‘Fox.

Which is why I keep updating GoalCopy. This latest version works with Firefox 9. It still only works with the old interface, but an update for GA v5 should be ready in a few weeks.

For now, just download the latest version of GoalCopy here and get to copying! You might encounter a weird glitch where only the Find/Replace toolbar shows and the Copy/Paste options are nowhere to be found. Just re-enable it through the new Firefox menu as shown below:

GoalCopy menu options

What about you? Have you made the switch to Chrome, or are you sticking with Mozilla? What sort of features do you want to see in a Google Analytics add-on? Please leave a comment below and let me know!

How to Track Conversions for Both Internal and External Campaigns

After you learn about campaign tagging for Google Analytics, you may be excited that you can add all that extra information to a simple little link – so excited that you want to put campaign tags on every kind of promotional link that leads to a web page on your site. But there’s one kind of link that should never get campaign tags. You should never put GA campaign tags on internal banners or on-site promotions that lead from one page of your site to another.

Why You Shouldn’t Use GA Campaign Tags for Internal Promotions

Imagine this sample scenario: A visitor clicks an email campaign link from your latest marketing effort and lands on your site. Google Analytics records the traffic source and starts collecting data for the visit. Of course you hope that the visitor will continue to view pages on your site and maybe even convert on an important goal like registering for an upcoming conference or buying your latest e-book. When they do, you’ll be able to attribute that conversion to the campaign and evaluate that campaign’s success.

But what happens if the visitor clicks an internal banner with campaign tags before they convert? Google Analytics records a new traffic source and starts a whole new visit. So now you have at least two problems: You’ve split what was really one visit into two visits, skewing your data. And you can’t tie the original email link directly to the conversion, because the conversion happens in a separate visit.

To track internal promotions without splitting visits and losing credit for conversions, try one of these instead:

  • Add your own campaign parameters (not GA campaign tags) to the links and view the data in your Content/Pages reports
  • Use event tracking when a visitor clicks an internal banner or promotional link and view the data in your Content/Events reports

Alternative #1: Add Your Own Campaign Parameters

The first method involves making up your own tags, ones that GA won’t recognize and will pass right along into your Pages reports with the rest of the URL. Instead of utm_source or utm_medium, for example, you might simply add something like “from=promo” to the target link:

http://www.anything.com/buy-ebook.html?from=promo

Or you could use a more detailed scheme if, for example, you run internal promotions with many types of links in different places. So you might have one parameter similar to campaign name, like “campname=e-book”, and another parameter that describes the links, like “camplink=home-page-banner” or “camplink=side-nav-feature”:

http://www.anything.com/buy-ebook.html?campname=e-book&camplink=home-page-banner

http://www.anything.com/buy-ebook.html?campname=e-book&camplink=side-nav-feature

As long as you stay away from Google Analytics utm parameters, these types of URLs will appear in your Content/Pages reports and you can tell by the number of pageviews exactly how many times a visitor clicked the tagged link to arrive there.

Internal campaigns in the Content Pages report

Alternative #2: Use Event Tracking

The second method involves adding a bit of code to the link on the page. Inside the anchor tag (a href=”…”) include an onclick event like this (a href=”…” onclick=”…”). And in the onclick event, add the event tracking code using an event category and action like “internal promo” and “home-page-banner”:

onclick="_gaq.push(['_trackEvent', 'internal promo', 'home-page-banner', this.href]);"

After the event category and action it’s a good idea to include the optional event label. For the label you can simply write the target (href) of the link, using this.href.

View this data in your Content/Events reports by drilling into Top Events through the “internal promo” category, where you can see the how many times someone clicked each of your different internal promotional links.

Internal campaigns in the Top Events report

Combine with Custom Variables for Goal Data

Okay, so where’s the goal data? You may have noticed that Google Analytics has Goal tabs in Traffic Sources reports, but not in Content reports. The whole point of these alternatives was to keep your original traffic source intact so you could tie it to a conversion. But you probably also want to know how well your internal promotions lead to conversions, too, right? Of course you do.

Well, there’s another set of reports that has Goal tabs, where you can combine conversion data with a set of dimensions that you define, and that’s the Audience set of reports. You can write a custom variable with the parameters or event data you created in either alternative described above. And then you can easily compare goal conversion data in a single table that lists all your internal promotions.

Conversion Data in Custom Variables report

The thing to remember when writing custom variables is that the data needs to piggyback on a _trackPageview or _trackEvent call.

For the event tracking alternative, add _setCustomVar to the onclick event, like this:

onclick="_gaq.push(['_setCustomVar', 1, 'internal promo', 'home-page-banner', 2]);_gaq.push(['_trackEvent', 'internal promo', 'home-page-banner', this.href]);"

For the other alternative where you make up your own campaign parameters, I suggest adding _setCustomVar to the page that’s the target of the link, right before the usual call to _trackPageview. You can use a little Javascript to read the URL and write the custom variable according to the campaign parameters that appear there. For example, if the URL is:

http://www.anything.com/buy-ebook.html?campname=e-book&camplink=side-nav-feature

The resulting custom variable code (placed before the call to _trackPageview) could be something like this:

_gaq.push(['_setCustomVar', 1, 'e-book', 'side-nav-feature', 2]);

In both cases I’ve set a session-level custom variable (indicated by the number 2 above), and I’ve set the custom variable to slot number 1 (out of 5). If you are already using that slot then you’ll need to assign it to another one. Read our post about how to keep track of custom variable slots and scopes for more guidance.

No More Split Visits

Avoid the split-visit problem. Keep visit data together by keeping internal and external promotions separate. Track your external campaigns with GA’s utm parameters and try one of the above alternatives for internal campaign tracking. And tie both external and internal promotions to conversion data to evaluate the success of each.

What methods do you use for tracking internal promotions? And how do you tie them to conversion data? Please share in the comments.

Who Are These People Visiting My Website?

This is part 3 of a multi-part series on increasing conversions from your website traffic. If you haven’t already, you should read part one, which introduces the Infinite Conversion Loop. And Part Two which gets your Analytics in order.

Now that you have high confidence in your Analytics, let’s discuss the next step of the Infinite Conversion Loop, identifying your visitors. The first thing to understand when you are trying to improve your conversion rate is that not all visitors are created equal, which is why simply looking at your overall traffic numbers is an empty metric.

On any site you are going to have a wide variety of visitors that all want and expect different things. Here’s just an example of a few of the types of people you may see if you run a website for used car shopping, but these same type of people exist for many sites.

The Cast

  1. Mr. Shotgun – This guy isn’t great at searching, just average. If he wants to buy a new 2012 Audi A6 with leather, his query is probably just “audi”. Then he clicks on the first search result he gets without reading, hits back, clicks the next one, hits back, until he finds something that kind of meets his expectations. These are the people that end up on page 5 of Google result and kill your bounce rate if you don’t have a clear message.
  2. Miss Untargeted – This is the visitor you get from Reddit, Hacker News, Drudge Report, etc… when you post a great blog. They give you that big awesome spike in traffic that never seems to result in increased conversions. They make you feel good about your traffic numbers, but really they have no intention of converting on your website. They also make your site-wide conversion numbers useless, and cause Sys Admins to pull their hair out.
  3. Mr. Confused – This person is running IE6, unpatched, he’s looking for exactly what your website sells, but can’t figure out how to find it on your site, and when he does he don’t trust you because you don’t have the Visa or BBB logo.
  4. Señor Advanced – This person found your website with a query like: used -new acura tl -reviews “low mileage”. Your website is exactly what they’d want, but your refinements don’t let him find what he’s looking for in an efficient way so he leaves.
  5. Mrs. Researcher – She got to you by clicking your ad, she’s looking for what your site sells, and she even finds product she wants, but wants to make sure she gets the best price, so she’ll bookmark your site for now while she looks at some other sites.
  6. Botman 9000 – Some percentage of your traffic will be bots, spammers, or others who have no intention of using your website like a real person, let alone buying something. While the bots won’t usually show up in your analytics, they will often submit forms and do other things that makes your “back end” numbers never quite match up with the Analytics numbers.

This cast are the reason your overall visits mean nothing. These people represent the 98% of people you get daily but are not converting. I could give you a million hits today, but if they are the people in this group, you’ll see $0 out of it. The key to improving conversions is first getting a handle on what type of visitors are likely to convert in the first place, and then optimizing your site to convert those that are not converting now for some reason (some of the above have the potential, but your website has deficiencies that prevent them from doing so).

The Numbers

So first, let’s figure out who IS converting on your site. The first thing I would look at is your landing pages report, ordered by visitors. Specifically the Bounce Rate (The percentage of people that visited that single page then left).

What do these stats mean? First, these are from a profile I use that broadly groups types of content into single URLs. This site has over one million URLs, and I find most useful to categorize everything into types of pages (you can do this with filtered profiles in GA, which is probably the topic of another post). You can see the Index page of the site is how most people are entering by far. 22% bounce immediately, meaning something about the home page felt completely wrong for whatever those people were looking for. We’ll examine how to improve that number in future posts. You’ll notice a few popular blog posts have much higher bounce rates. These are the “Miss Untargeted” that are coming to your site for one-off content, but are probably not interested in buying whatever you are selling. It is interesting to note that one blog only has a bounce rate of 50%, indicating there is something about that post that invites people to dig further into your site.

Next I would look at the Exit rate (The percentage of people that left on a given page). The Exit rate is useful for identifying common pages that people are leaving your site on. This often points to problems on the page or shows you that people are not finding what they want (for example if a search result page is a common exit point). I order this report by Exit rate, filtering out outliers first.

Next look at where your most valuable traffic is coming from. I would do this by going to Sources->All Traffic, clicking ECommerce at the top, and then sorting by Ecommerce conversion rate. In this case, once you take out a few outliers, it looks like search engines (both paid and organic) are giving us the most valuable traffic. Another case of how blogs, social networks, etc… will increase overall traffic but not necessarily contribute to the bottom line (these things may be valuable for SEO though, so I’m not saying don’t do it, just don’t focus on overall traffic numbers as a KPI)

Of course it’s very difficult to read people’s intentions just by looking at numbers. The only real way we can try to find their intent is by looking at what they searched for to get to us (hurry before the number of logged in Google users increases!). Create a report of Organic Search Traffic ordered by Ecommerce conversion rate to see what terms are the most valuable. You’ll usually see some good long tail keywords you never would have considered. I would also sort by 0% conversions to see the keywords you may be wasting your time with. Remember to normalize these results by filtering to see keywords with at least 10 visits or so.

Those are some beginner ways of segmenting users or figuring out what they are trying to do on your site, some proactive ways to segment is the use of Custom Variables. Most people use these to track “logged in users” or what affiliate someone came from, but what about tracking those people who found no search results? That’s what I did here, and there is no surprise there is $0 revenue from those users… perhaps an opportunity to use spelling correction or show similar products.

Using Custom Variables is a great way to create segments of content and visitors to determine easily what types of users, content, etc… leads to the best conversions.

Hopefully using these tips will get you started in figuring out where your traffic is coming from, the next post in the Infinite Conversion Loop series will delve deeper into actually seeing what people are doing on your website.

Google Analytics Configuration Made Easy

Create an account, copy the code, and paste it on every page of your site. Easy, right?

Not so fast.

If you’re just starting out using Google Analytics, you may not be aware of all the advanced code implementations available, much less how to modify the code for your needs. But if you are tracking across subdomains or multiple domains, or if you want to do some advanced tracking with events that’s exactly what you need to do.

To make matters worse, navigating through the labyrinthine administrative interface to find the tracking code snippet can be somewhat daunting. Especially if you’re used to the old version of the interface. And although the code wizard in GA does include several configuration options, the instructions are neither complete nor easy to follow for beginners.

Google Analytics Configuration Tool by RavenTools

To solve these problems, the team at Raven Internet Marketing Tools has built the Google Analytics Configuration Tool. (Full disclosure: we provided consulting on some of the technical details for this tool, so of course we’re thrilled to see it’s birth). They just launched this free tool, aimed at simplifying the process of configuring your Google Analytics. Out of the gate, there are several specific situations they provide instructions for, including:

  • One domain with subdomains
  • Multiple domains with subdomains
  • Site search setup
  • 404 error page tracking
  • Event tracking
  • Setting up goals
  • Tracking Facebook page and referrers

There’s also a URL  builder for tagging your URLs with campaign parameters.

Besides just giving you the snippet of code, the GA config tool leads you step by step, asking questions about what you’re trying to track and then providing the code and instructions of what to do with it. It also provides the code in either asynchronous or the traditional ga.js.

This is a godsend for people who don’t deal with GA on a daily basis. Trying to figure the correct code configurations has generally meant wading through a sea of posts in the help forums, where the information is often outdated and inconsistent. This tool takes the guesswork out of the setup, letting you focus on what matters – your data!

Coming from the folks who also created the Schema Creator (for creating structured markup for your site), not to mention their core suite of internet marketing tools, this will be an essential addition to many digital marketers’ arsenals. They’re already working on adding functionality to help with regular expressions, setting up filters and other points of analytics confusion.

Go try this tool out and let us know what you think. Are there any other GA-related instructions you’d like to see added? What is it about GA that is most confusing to you?

The comments are yours.

10 Things To Check In Your Google Analytics

This is part 2 of a multi-part series on increasing conversions from your website traffic.  If you haven’t already, you should read part one, which introduces the Infinite Conversion Loop.

The old cliché – “How do you know where you’re going, if you don’t know where you’ve been?” is especially applicable to Analytics.  Before you can even hope to get a handle on increasing the conversion rate of your website, you need to make sure you’re actually tracking all of the things that will help you analyze what’s going on!

Measuring Tape

The most common problem we encounter with customers here at LunaMetrics is an incorrect or incomplete Google Analytics configuration.  Here’s a checklist of a few of the things you should definitely be doing before going any further in the conversion loop.

  1. Is the tracking code on EVERY page (and is it functioning)? To get a complete picture of your website, you need to see how all content is performing, including legacy content, 404 pages, terms of service, you name it.  If it can potentially be viewed by a person, I’d recommend putting tracking code on the page.

  2. It’s also recommended you update to the Asynchronous code if you are not already using it.  In my experience it provides much more reliable numbers.   The second question of “is it functioning” can be tested by looking at your data in GA, and also using an HTTP monitor to make sure the utm.gif is being requested on page load.

  3. Are sub-domains and cross-domains being tracked correctly?  You need to be able to see how people are flowing from one domain to another to assure conversions are being attributed properly.
  4. Are goals configured, with funnels?  Specifically, are they configured correctly?  Being able to visualize funnels will be key for analysis.
  5. Is E-Commerce configured?  All E-Commerce sites should have E-Commerce configured (obviously) to track dollar values of transactions.  But really any site that can provide a concrete monetary value to an action should have this.  Does a confirmed lead generation add to your E-Commerce?  What about a donation?
  6. Is AdWords Linked?  If you do any type of AdWords spending, it’s crucial that you link your account to be able to see how well these campaigns are working.
  7. Are Campaign tags being used consistently and efficiently?  Are you even using Campaign tags in your marketing?
  8. Are you tracking Events? I recommend tracking any high value action as an event.  If people are leaving your site for a third-party site, that should be tracked as an event. Downloading a file, clicking a drop down menu, it’s up to you to decide what actions make the most sense as events.
  9. Is Site Search configured?  This is one of the most useful things you can do.  If you have a search box on your site, more likely then not a confused visitor will do a search to find what they are looking for.  If they still don’t find what they want from your search, you can guarantee this will add to your bounce rate.  (On the flip side, often a really useful search box can make up for other navigational problems your site may have).
  10. Are you tracking Social Engagement?  Today “The Net” is much more then the web.  If you don’t have a social component to your site, you should consider adding some type of social sharing widget right now.  Once you have that installed, it’s important to see how and where it’s being used to get a picture of your engagement. That’s where the GA Social Engagement plug-in comes in.
  11. Is AdSense linked?  If your business relies on AdSense as a revenue, you’ll definitely want to see how it performs on your site.

Now that you have all of this setup, next time we’ll talk about how to analyze this data (beyond page views and visitor counts!) to figure out what’s going on with your site and how you can begin to optimize.

Google Analytics Custom Variables Not Working?

Custom variables... or not?

Everyone can agree: Google Analytics’ custom variables are a great feature. It lets you label your visitors with all sorts of fun stuff. Male or female? Member or non-member? Cat person or dog person? If you can identify your visitors’ answers to these sorts of questions, you can tag them with a custom variable.

But sometimes website owners implement the custom variable code and start gathering these valuable segments of traffic, completely unaware that the numbers aren’t very accurate. What could be causing such a heinous mistake?

Believe it or not, Google warns against the issue right in those instructions there, but they don’t call it out quite enough for my taste. It’s extremely important that you “call the _setCustomVar() function when it can be set prior to a pageview or event GIF request” (emphasis mine). Here are the details:

In certain cases this might not be possible, and you will need to set another _trackPageview() request after setting a custom variable. This is typically only necessary in those situations where the user triggers a session- or visit-level custom var, where it is not possible to bundle that method with a pageview, event, or ecommerce tracking call.

What exactly does this mean? Well, if a visitor fills out a survey on your site, hits submit, and you run _setCustomVar() after the _trackPageview() of the submission success page, that _setCustomVar() call just sits there in deep space, waiting for another _trackPageview() or _trackEvent() function to carry it along to Google’s servers. If that is the visitor’s final pageview in the session, then the call floats away forever, never to be heard from again.

The worst part, though, is if the visitor goes to another page, then the _setCustomVar() will tag along with any subsequent GIF requests. This means that it may appear as if the custom variable is working just fine, according to the reports in Google Analytics, but the numbers are just inaccurate.

So, to ensure that you are tracking your custom variables as precisely as possible, make sure that you always run the _setCustomVar() function before the calls to _trackPageview() or _trackEvent(). If this isn’t possible–you have an include at the top of every page, for instance, and can’t modify it–then be sure to include a second pageview or event after the _setCustomVar() function, like this:

_gaq.push(['_setCustomVar', 1, 'membership', 'gold', 1]);
_gaq.push(['_trackEvent', 'Tow Truck', 'go', '-', 0, true]);

This will ensure that every single time that function runs, it gets counted. Guaranteed!

Update: Tyson Kirksey, of Vertical Nerve, reminded me to set the event to non-interaction mode so that it won’t influence bounce rate, pages/visit, time on page, etc. I’ve also borrowed his clever naming convention for the event. Thanks, Tyson!

Are You Really Standing Out?: Brand Keywords in PPC

If there’s one PPC practice that should be instilled among all advertisers, it’s to make your brand stand out: not just physically or visually, but behind the scenes as well.

Of course, advertisers want their brands to stand out above the rest, that is a given; but it’s important to keep this same methodology in place when compiling your PPC campaigns (and I’m not just talking about writing an eye-catching ad).

Here’s an example: Imagine you work for an athletic shoe company. If a potential buyer searches “(Your Brand Here) women’s tennis shoes,” you don’t want your generic keyword “women’s tennis shoes” to battle with other brands’ generic keywords in order for your ad to appear. Sure, it’s possible that your generic keyword will trigger your ad as a result of this search, but chances are that any click captured in this way will be much more expensive than a click as a result of a branded keyword. You’re paying more for that click than you should have, and fighting for that click with more competitors than necessary; having brand keywords could have helped your ad show up in a better position while obtaining clicks at a lower price.

PPC gurus know that to develop a successful structure for Paid Search campaigns and accounts overall, product and services should be grouped tightly, in order to ensure potential customers are seeing ads that are relevant to their search queries and landing on site pages that take them where they need (and want) to go. You’d be surprised, however, by how many advertisers group their brand keywords with generic non-brand keywords, assuming that as long as the campaigns and ad groups are specific enough, brand and non-brand keywords will work the same. Moreover, you’d be surprised at how many advertisers don’t bid on brand keywords at all! Always make sure you have brand keywords throughout your account… always! I have seen VERY few instances where not bidding on brand keywords has been the better choice for an advertiser.

The Value of Separation

While the simple example above explains why it’s important to have branded keywords within your account, we still haven’t touched on why these terms should be separated. Just as any campaign in a PPC account is separated from another, brand and non-brand campaigns perform differently, and can therefore be managed differently.

Let’s use another example from the same athletic shoe company: The keyword ‘women’s tennis shoes’ should not be found in the same ad group or the same campaign as the keyword ‘(Your Brand Here) women’s tennis shoes.’ The main reason for why we should do this is obvious: user intent is different, and therefore performance is different. When a user types a brand name into a search engine, whether or not it is long- or short-tail, that person already has that brand on his or her mind. Therefore, a campaign consisting of only brand terms will almost always have a higher click-through rate than generic campaigns, while also likely spending at a lower rate due to the lower price of the keywords themselves.

Put it to Use

As I touched on in a past blog post, click-through rate is the strongest factor in determining quality score, and having a strong quality score is key for PPC accounts. While you can’t see the direct effect of quality score instantly, the strong click-through rate of brand campaigns will earn you some extra brownie points with Google when it comes time to determine CPCs and ad rankings. Mixing brand and non-brand keywords in the same campaigns would not result in the strong click-through rates an all-brand campaign would see. In another blog post I also explained the value and importance of negative keywords, and brand vs. non-brand is a perfect example of such usage. By having brand and non-brand keywords separated, you can ensure branded searches are never triggered by generic (and remember, more expensive!) keywords by setting your brand name as a negative throughout your generic campaigns/ad groups. This will help keep your costs stabilized and also ensure that the best ads are showing up for the right searches.

Split your branded keywords into appropriately relevant campaigns and ad groups just as you would non-brand campaigns. Once this is complete, I recommend giving these brand keywords strong max CPCs to ensure they appear in top rankings. Also be sure that the ads contain your brand name itself in the headline, so that potential customers see right away that you are the company they are looking for.

Thanks to Google’s automated rules tool, you can set a rule to run for these campaigns that will ensure these keywords remain above a certain average position, specified by the advertiser.  I recommend setting a rule to keep the average position of keywords somewhere between 1.5 and 1.3, but this should be set based on what you know works for your keywords (and this can be changed at any point in time).

When a keyword drops below the set position, Google will increase the max CPC by the amount of the advertiser’s choice, and will discontinue any bid increases when it reaches the maximum CPC you indicate (if you so choose). These changes can be made based on the time interval of data you choose, but I usually set the rule to run based on data from the previous day, and to run everyday around noon or 1pm. I highly recommend the use of this tool – there are many different ways to set automated rules and they can be updated or discontinued at any time.

Setting up separate brand campaigns will help you efficiently capture additional conversions at a lower cost, while allowing you to separately manage your more expensive generic keywords with results that won’t negatively affect the results of your brand keywords.

The Case of the Misplaced Site Search Data

What does it mean when “search/organic” turns up as Source/Medium in your Google Analytics reports? It could mean some of your visitors are using the search engine Search.com (yes, there really is a search engine called that), but it could also be bad data because Google Analytics mistakenly attributed visits to Search.com even though they came from somewhere else.

Data Investigating Bad Data

How could that happen? Suppose your site www.anything.com has a search box (of course it does!) so visitors can search the entire site. Unfortunately, the site search engine returns search results pages with URLs like this:

search.anything.com?q=anything

I say, “unfortunately,” because that’s exactly the kind of URL that Google Analytics mistakes for the search engine Search.com.

How Site Search Gets Mistaken for Organic Search

Google Analytics keeps a list of search engines, and it recognizes them by looking for certain items in the referring domain and referring page query string. If the domain contains “search” and the query string contains “q” then GA thinks the referrer is Search.com.

There’s even more bad news. Suppose this visitor originally came to your site from an email campaign, which you cleverly tagged with cool campaign info (newsletter/email), as you should. As soon as the visitor uses your site search, GA mistakenly sees a new traffic source (search/organic)… and starts a brand new session.

This scenario played out recently for one of our clients. The previously documented solution, using _addIgnoredRef, did not work. So we reported it to Google engineers, who reproduced and confirmed the issue and promised to get back to us with an update.

In the meantime, we devised a simple workaround that immediately improved the data. If your data has been compromised by this issue, it can help you, too.

How To Fix It

Our solution is a little script that we include on every page on search.anything.com. The script looks at all the links on the page and if a link goes to anything.com, it appends a parameter to the URL that tells GA not to change the source/medium to search/organic.

jQuery.noConflict();

jQuery(function() {
  jQuery("a").each(function(index) {
    var link = jQuery(this);
    var href = link.attr('href');

    if (href.indexOf('www.anything.com') != -1 && window.location.href.indexOf("search.anything.com") != -1)
      {
        jQuery(link).bind("click", function(l) {
          location.href = href + (href.indexOf('?') != -1 ? "&utm_nooverride=1" : "?utm_nooverride=1");
          return false;
        });
      }
  });
});

If you’re already familiar with GA parameters you’ll see the key to the script is the parameter utm_nooverride=1, which is more typically used when visitors return to your site from third-party shopping carts, or for ad campaigns where you don’t want to overwrite existing referral data.

In this case, utm_nooverride=1 means GA won’t write a new traffic source (and mistakenly start a new session) just because a visitor uses site search.

Remember you also need to refer to the jQuery library before you call the script, like this:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>

Have you come across this issue on your own site or a client’s? If so, how did you handle it? Please share in the comments.