Stop Tracking Code Migration Migrain with your own Google Analytics Functions


Migrating to the “new” asynchronous Google Analytics tracking code should just be a matter of replacing the old code by the new one, shouldn’t it? So why are there still so many websites that use that old, worse-performing code from 2009? Because migrating is more than just replacing the basic snippet: For example, the new tracking code requires you to also update your Virtual Pageview and Event Tracking calls. To mitigate future migration migrains when Google changes its tracking code the next time, you should write your own Google Analytics functions.

Google released the “new” asynchronous tracking code in December of 2009. As the Lunametrics blog explains wonderfully, that code

  • makes your page load faster
  • tracks more of your traffic
  • no longer poses a problem when Google’s servers are not responding right away (earlier, that would halt the loading of your page)

Those are only a few of the many benefits of that new code.

But, December of 2009, that’s over two years past now. So why haven’t we all migrated yet? Maybe other websites faced a similar challenge to the one we had.

When tons of Event Tracking and Virtual Pageview calls have to be replaced

For our company, the biggest problem when migrating wasn’t removing the old basic snippet at the bottom of the page and inserting the new basic snippet in the <head> section. That was nothing. Our problem were the hundreds of inline Event Tracking and Virtual Pageview calls. For example, whenever we wanted to track clicks on specific links as Events, we followed Google’s advice and inserted the well-known “onclick” inline method that called our good old friend Mr. PageTracker and told him to track an Event:

<a onclick="pageTracker._trackEvent('Category', 'Action',
'Label', Optional_Integer_Value);">click me</a>

Now, if you migrate to the new tracking code and leave Event Tracking calls like these the way they are, you’ll get an “Uncaught ReferenceError: pageTracker is not defined” in your JavaScript Debugging Console: Your events are no longer being tracked. (Luckily, we found that out before migrating.)

The migration migrain

What made migrating an even heavier migrain was that we had a dozen different systems and technologies (a general website CMS, a blog CMS, a large community platform, several event application and registration tools, a survey tool, a flash quiz application, a job board, a wiki, some facebook fan pages etc.). Some of them were legacy systems our IT didn’t really want to touch anymore. And even in the case where we had the possibility to just do “search and replace” in the code, that wasn’t that easy because the old

pageTracker._trackEvent('Category', 'Action', 'Label', Optional_Integer_Value); 

would have to become

_gaq.push(['_trackEvent', 'Category', 'Action', 'Label', Optional_Integer_Value]);

That’s why we couldn’t just replace “pageTracker._trackEvent” by “_gaq.push”, we also had to find some way to add those square brackets at the right places in the end and slide in that fourth parameter (_trackEvent). It turned out that this was harder than I had thought (at least that’s what our IT said).

The solution: We wrote our own Google Analytics functions 

So what did we do in the end? We wrote our own Google Analytics functions in the form of a JavaScript object called something like “MyWebTracker”. It is included on every page with all the other standard JavaScript files. To give you an example, here is an excerpt of the object with its Event Tracking method. This method doesn’t do much else but calling Google Analytics’ new native _gaq.push function: 

var MyWebtracker =
   {
   event: function(category, action, label, event_value)
      {
      if (event_value === undefined)
         {
         _gaq.push(['_trackEvent', category, action, label]);
         }
      else
         {
         _gaq.push(['_trackEvent', category, action, label, event_value]);
         }
      }
   }};

When our editors or programmers now want to use an Event Tracking Call or a Virtual Pageview, they now have to call our own method – or “function”, if you will:

MyWebtracker.event('Category', 'Action', 'Label', Optional_Integer_Value);

Since this own method doesn’t need any parameters in square brackets, and since it has the same number of parameters (maximum 4) as the old Google Analytics pageTracker function, it was a lot easier to search and replace because all we had to do was search for “pageTracker._trackEvent” and replace that by “MyWebtracker.event”.

In case you aren’t sure if you found all those old Event Tracking calls…

What you can do additionally is to write a function called pageTracker._trackEvent that does nothing more than drop off the request to your own new MyWebtracker function (which then hands it over to Google Analytics’ native function again). So in case there are some places left where you didn’t/couldn’t replace the old Event Tracking call, you can still make sure that those events are being tracked. Be aware though that your old basic tracking code snippet really has to be off the page in this case because you’re using the same name Google uses (“pageTracker”). 

var pageTracker =
   {
   _trackEvent: function(category, action, label, value)
   {
   MyWebtracker.event(category, action, label, value);
   }
};

Next time Google changes the tracking code, you’ll sleep just fine

So what is the benefit of this apart from easing your migration? Imagine Google Analytics changed their Event Tracking method again (and they probably will, as there will probably someday be an even better general tracking code). Imagine that this new Event Tracking method not only had a different name again (say, “GATracker._trackEvent”), imagine that it also, again, required a fourth obligatory parameter (like “true” or “false” for the newly introduced “non-interaction” event). In that case, all you would have to do is to alter the one central MyWebtracker object’s “.event” method to fit the new GA standard instead of searching and replacing through hundreds of places and systems.


This doesn’t only hold for Event Tracking

What works for Event Tracking of course also works for other often-used stuff like Virtual Pageviews, Custom Variables or cross-domain link tracking. So next time Google changes its tracking code, you’re prepared to take advantage of it quickly.

Why HTTPS websites like Xing don’t send you any traffic (according to your Google Analytics)

Ever wondered why the biggest German-speaking business network Xing sends you almost no or no traffic at all? It might not only be Xing. As Facebook, Twitter and Google+ and an increasing number of other websites, Xing runs on the secure HTTPS protocol. And that can mean trouble for the referrer data in your Web Analytics tool.

The good old HTTP referrer is getting less and less reliable. Reasons include:

https (by svilen001, sxc.hu)


  1. The multitude of ways other than traditional links you can arrive at a page. For example, think of mobile, desktop or browser apps.
  2. Google Analytics discriminates against “normal” referrers by treating them as less important than search engine or campaign links when a user’s source changes during a visit. I say “discriminates”, but there are probably some good reasons for that.
  3. The “new” (well, from 2009) HTML link attribute “rel=’noreferrer’” which allows websites to not leak any referrer information when following the link.
  4. The increase in sites using HTTPS.  When a link goes from an HTTPS to a HTTP site, by default no referrer is transmitted. This can be a major problem, especially with important sites running on HTTPS, like Facebook, Twitter, Google+ or Xing, the largest business network in the German-speaking world. The whole “keyword not provided” debate when using Google in HTTPS is a related, but different discussion.

If you’re using “untagged” links (no utm_source and the like), all four cases will mostly lead to “direct traffic” in your Web Analytics tool.

I will dig deeper here into that fourth point because a lot of web analysts are not aware of this. And when web analytics tutorials on analyzing your sources discuss referrers, this topic barely if ever comes up. Google Analytics’ Conversion University doesn’t touch it in its Google Analytics Tutorials. Even Avinash Kaushik added this issue only after a user suggested it in his post on “making love to your direct traffic“. 

Facebook, Twitter and Google+ are not a problem

To ease your heartbeat a little, HTTPS is not an issue with Facebook, Twitter or Google+. All these networks seem to want to show other websites that they are generating traffic for them (they should!). All channel their links through a non-HTTPS page that serves as an intermediator (Google+: plus.google.com?url=…, Facebook: facebook.com/l.php?u=…, Twitter: t.co/…). That way, the referrer gets sent along. Make sure to add the “t.co” source to your Twitter segment, by the way.

Intermediate pages also make surfing easier

This intermediate page has other reasons, of course: It makes surfing safer and more private. Firstly, Twitter & Co. can thus prevent you from moving to a spammy or infected site (yet, also sites they might want to censor). Secondly, Twitter & Co. can cloak the original referring URL so the destination website can’t see that someone clicked on a friends-only link on someone’s Facebook page (“facebook.com/john.doe” is not the most private of URLs).

See this example for a link to webanalyticsworld.net on Facebook:

HTTP://www.facebook.com/l.php?u=HTTP%3A%2F%2Fwww.webanalyticsworld.net%2F&h=oAQH3bikK

Facebook even rewrites links in email notifications this way. So if someone sends me a link via a Facebook message and I click on that link in my email notification without going to my Facebook inbox first, the referrer will still be facebook.com. That way, Facebook makes sure the rest of the web gets a complete picture of Facebook’s share of their traffic.

Xing, and other https pages, are problematic

Still, there are https sites like Xing that don’t use intermediate pages. Yet, they may generate a lot of “organic” traffic for you, that is, traffic you didn’t provoke yourself like when people send each other links to your site or post them in their status updates. In that case, there is hardly any way you can figure out Xing’s impact for your website via Google Analytics if your own website doesn’t run on HTTP.

GA Chrome Debugger Screenshot 1 : Xing (HTTPS) link to HTTP page. Referrer = “-”, Campaign Source = “direct”

https to http (Screenshot of GA Chrome Debugger)

Screenshot 2: Xing (HTTPS) link to HTTPS page. Referrer gets transferred, Campaign Source = “xing”

Referrer data when link goes from https to https (GA Chrome Debugger)

LinkedIn, by the way, runs almost entirely on HTTP (the settings page is on HTTPS) and has a similar rewriting mechanism like Facebook and Google+. So no need to worry here.

So what does all this mean for you? 

1. Does your website run on HTTPS?

a) Good for you, because you need not worry about not seeing the referral traffic in your web analytics tool, as traffic from https to https preserves the referrer. 

b) Bad for you, because other non-HTTPS websites you’re linking to might not realize how much traffic they get from you. Try a solution like Facebook’s to ensure that other sites see your impact.

2. Does your website run on HTTP?

  • Tag all the links you can influence with the utm campaign parameters.
    Check out Google’s basic guide and Lunametrics’ Dorcas Alexander’s suggestions for a good tagging hierarchy.
      
  • Add default campaign parameters when providing “share” links through a widget in an article or product. 
    Example: Add  ”utm_source=share&utm_medium=shared-referral&utm_campaign=share_this-url” to the links if someone uses your share widget. You might want to have the links shortened automatically in the process via the bit.ly API or your own tool so they don’t get so long.
     
    If you are really nifty, you can even provide different parameters depending on which sharing option someone clicked on (“share-email”, “share-twitter” or “share-xing” for example).
      
  • If possible, switch to HTTPS.
    I know this is not easy because there are so many other problems associated with HTTPS. For example, a lot of external tracking scripts or widgets, like Google’s on-site search (how ironic!), do not support HTTPS and create ugly browser errors (Internet Explorer 8 shows a popup warning on every page for example). We switched back to HTTP on our website because of these problems last October.
What are your suggestions on how to deal with unrecognized HTTPS traffic?
Now it’s your turn: Do you think you are missing out on a lot of traffic from an important HTTPS site? How are you dealing with it?

Six Testing Features Your E-Mail Marketing Tool Needs

“Test and Target” is the way to success – especially in e-mail marketing where you can get results especially fast. Nevertheless, some e-mail marketing tools still make testing an overly tedious affair. So before you decide on a tool for your company, make sure it comes with these six testing features.

After six years of creating countless newsletters and other e-mail campaigns, I have come to the conclusion that, apart from the “basic e-mail marketing stuff”, it is really hard if not impossible to predict what makes your e-mail message perform better. With “basic e-mail marketing stuff”, I mean the rather obvious advice one usually reads about in the abundant guides that teach you how to improve your marketing e-mails: a clear call-to-action, a content-related subject line instead of just “Newsletter 7/2012”, personalizing content according to your recipient’s profile, and so on.

Which path is the right one? Split Tests help (Image by burnin_dog, sxc.hu)Is a short subject line better than a long one? Well…
With the other “stuff”, it is difficult to generalize. Is a short subject line really better than a long one? Depends. Is it better to send the campaign out at 6am or 6pm? Depends. Is a subject line with an imperative (“Apply for this Web Analytics event now!”) better than a more descriptive one (“The latest Web Analytics trends: Google is doomed”)? Depends. Is a subject line informing of a limited offer better than one that leaves this out? Probably in most cases, but if you overdo it, your users might get tired of it. So yes: It depends!

Tendencies yes, but hardly general recipes
Christian, a colleague of mine, recently did some larger-scale e-mail campaign testing, using some typical testing variables (imperative vs. descriptive subject, morning vs. evening roll-out etc.). There were some tendencies. For example, a roll-out in the morning seemed to be better in most cases, but far from all cases. So it was hard to distill any company-wide guidelines out of the test results. The problem seems to be that there are so many intervening variables that it is hard to control for each of them.

To name some examples for these intervening variables, let’s look at some obvious examples from the recipient list. Here, we (a recruiting company) usually deal with very different demographics, eg. the recipients’ life phase (working, student, high school graduate), the recipients’ university majors, or their e-mail history (some recipient lists may contain a large portion of users that have already received a couple of mails this week, other lists may contain more users that haven’t received a mail in a week), and so on…

So yes, there are some general guidelines on what triggers user action in 60-plus percent of all cases, but every campaign is different: That is why the best way to make sure you are actually sending an effective e-mail campaign is to test at least two versions with a small sample before sending it out to the winner.

Some e-mail marketing tools do a woeful job facilitating tests
Of course, saying that testing leads to success has become trivial these days. But if you look at the testing tools that e-mail marketing providers offer, you get the impression that split testing is still reserved for some rare kind of overly ambitious marketing geek. Lamentably, it probably is that way. :(

So the following recommendations all hail from my daily frustrations with the overly tedious e-mail marketing tools I work with. I will shun “naming and shaming” here because I only know two larger e-mail marketing tools in depth, and it would be unfair to single them out while the other companies’ products might be just as poor. I would love to read your comments though on how your e-mail marketing tool deals with these things. I should note that the software I have worked with are enterprise solutions hosted by two of the many e-mail marketing service providers that call themselves “market leader in e-mail marketing” (I always wonder how there can be so many “market leaders”). To their benefit, both solutions are really great in other areas like segmenting or their API.

So which testing features should your ideal e-mail marketing tool offer?

A: Top priority features

1. A QUICK and EASY way to compare two or more versions of a message (ideally, with a separate, even quicker feature to test only subject lines)

Ok, probably every single e-mail marketing software provider will tell you their tool offers this, i.e. a split testing tool to test different versions of a message. The real question though is how! Ideally, it should take no more than three minutes to set up and roll out a simple A/B subject line test. If it is not quick and easy, people won’t use it – that’s what has happened in my company because our current tool is nerve-wreckingly tedious when it comes to split tests.

So check for the following usability issues:
a) In order to send out an e-mail campaign, most e-mail marketing tools require you to set up three things: the e-mail message, the recipient list, and the campaign that ties the first two together and sets the roll-out time etc.

Now, for a single A/B subject line test, could it be that you have to set up two entire campaigns and two entire messages, including the message body even though you only want to test the subject line? In that case, you are dealing with what is depicted in the graphic below as a “Tedious Split Test Campaign”.

b) And while you are setting up the second message and campaign, could it be that you have to fill in almost all the fields again (for campaign A and B and message A and B) even though only one of them differs (the subject line)?

Diagram showing split campaigns

c) Is it easy to jump back and forth between the settings of the split run and its associated campaigns and messages – i.e. one click?

Our current tool doesn’t match any of these criteria.

So how would the ideal tool manage this?
The ideal tool would offer an option in the split campaign menu that allows you to add one or more messages to be tested, thus sparing you of creating additional campaigns for every version. The super-ideal tool focussed on facilitating quick insights would even distinguish between a more complex test of entire messages (where it is ok to create two messages) and a simple subject line test (where creating one message should do). In the latter case, you would determine the different versions of the subject in the message or campaign settings.

2. Determine a sample size for each variation.
If you want to try out something more outlandish, you’d prefer to throw it at just a tiny fraction of your recipients first instead of having to go into 50/50 mode.

So your tool should allow you to:

  • set the general sample size of your test run (say, ten percent of your recipients)
  • set the sample size of each of the variations you are testing (e.g. 80 percent of the 10 percent sample get version A, 20 percent get version B)

3. Assign different campaign tracking parameters to your links depending on the version
A successful e-mail campaign does not end with a click, it ends with a conversion. Some messages might draw a lot of clicks, but few conversions (e.g. because the e-mail copy promises too much), others draw fewer clicks, but more conversions. If you want to take that into account, your e-mail marketing tool needs to allow you to

  • automatically add campaign tracking parameters to your links (utm_source and the like for Google Analytics)
  • vary those parameters for each version to be tested (in Google Analytics, I usually use the utm_content variable for this purpose)

4. Automatic roll-out
So you have spent all day writing your wonderful newsletter, and your mailing schedule says it has to go out today. It’s 6.30pm. And naturally, you really want to stay at work for another two hours to see the results of your split test before being able to roll out the winner. What? You really don’t? Ok, so what does that lead to? Right, zero split tests! Zero improvement! The solution: Some tools (not ours!) offer an automatic roll-out of the winning variation (usually measured by the click rate) after a time you can specify.

B: Medium priority features

5. Multivariate tests
I have headlines H1 and H2 and images I1 and I2. With automated multivariate tests, I can find out whether H1 and I1 is a better combination than H1 + I2, H2 + I1 or H2 + I2. With a usable multivariate testing tool, I can do this all in one single message with some markup intelligible to non-programmers, and I don’t have to set up four campaigns and four messages. Once again, the URL parameters in each variation should reflect the respective combination of “variables” (in this case, the headline and image used). That way, you can tie them to conversions (see 3.).

6. Test the best time for roll-out
Is it better to send my newsletter at 7pm in the evening or the next morning at 7am? Especially for recurring campaigns like weekly newsletters, it is important to know the time your recipients are most responsive to your mails. That is why a great split testing tool allows you to mail samples of your campaign at different times. Again, you should be able to specify these times up front and not have to go back to your tool for each roll-out.

Don’t forget to check the reports
That being said, all these features should of course come with some sensible reporting. So make sure to check the split testing reports: Do you understand them right away? Are the necessary metrics included (at least open and click rates for each tested version)? Are they visually presented in a way that makes comparing results easy (eg. right next to each other)?

Discuss: How is your tool doing?
Are there any features that you think are missing on this list? Are you happy with your e-mail marketing solution’s testing features? I would be glad if you shared your experiences.

Google Panda Explained [Infographic]

Since its release in Feb 2011, Google set Internet marketers into a spin trying to figure the new algorithm changes. While the premise of the update was to hit the spammy and poorer quality sites on the web the reality was not that straight forward. There have been league tables published listing ‘winners’ and ‘losers’ and many of the large poor quality content farms have been hit but controversially not all of them.

As I said things are never clear cut or straight forward with Google’s Algorithm but I guess being the worlds smartest search engine gives it the right to be fickle.

Ignoring the nuances, quirks, and way too technical stuff that SEO’s argue about, the main premise of the update around more quality content and link relevance still stand. The infographic below does a nice job of summarising some of the milestones in the Panda Roll out as well as highlighting things like potential site penalties, new link building rules and advice on what to do if your site got penalised.

Oh and it has some cute pictures of Pandas in it as well!

 Infographic explaining Google Panda Updates

Single Grain – A Digital Marketing Agency

Debugging Google Analytics code (II): A Tutorial Video on Fiddler’s Inspector and AutoResponder functions

Fiddler is a tool that many web developers are common with. It is my favourite tool for debugging existing tracking code and testing new code.  This video shows two useful functions for this purpose: Inspectors and the AutoResponder. 

Fiddler is a free Web debugging tool. You can download it at fiddler2.com. Fiddler logs all HTTP traffic between your computer and the internet. That means you can view just about everything that is exchanged in the background while you’re browsing the web.

What makes Fiddler so great

Apart from the functions shown in the video below, I love Fiddler because of at least one more reason: It is not dependent on any browser. Tools like Firebug, Chrome’s Web Developer Tools or the Chrome Extension “Google Analytics Debugger” (see the first article on how to use these tools) all just work within one or the other browser. But Web Analytics code is usually JavaScript code. And JavaScript works differently from browser to browser. That does not mean that Fiddler should be seen an alternative to Firebug. Both tools have their purposes and go very well together.

The following video shows how to use Fiddler for Web Analytics purposes. You will learn:

  • How to test existing code with Fiddler’s “Inspectors” feature. The use case will be the test whether a click on an application button really triggers the desired Virtual Pageview call
  • How to try out new or different tracking code without having to upload anything to your server (no IT needed!).

 

Basics of Debugging Google Analytics Code: GA Chrome Debugger and other tools

**7th Feb 2012 – you can now watch the second instalment A Tutorial Video on Fiddler’s Inspector and AutoResponder functions**

Is that Virtual Pageview really being sent to Google Analytics when someone submits my registration form? Does the Event Tracking Call for outbound links get to GA in time before the visitor has left my website? Why do I not get any data for clicks on my teaser links? Questions that can drive a Web Analyst mad. Not if you know how to debug.

When I started using Web Analytics tools, there always was this huge black box: I’d put the tracking code on each and every page, and from then on, I usually waited and hoped the code would work as intended. Often, it didn’t, but I wasn’t able to see that until hours or sometimes a day later when the reports poured in to Google Analytics. Sometimes, it seemed to work, but only in some browsers. And so on. The more complex the code got (like when using Event Tracking for Flash applications), the harder it was to find out whether the code actually did what I was hoping it did. Luckily, that time is over.

Why is tracking code debugging so tedious?

  • Time lag: It usually takes several minutes to hours for the data to pour into the reports (even real-time analytics is never really real-time)
  • It was me, wasn’t it? You sometimes wonder whether the data in that report was caused by you or someone else that accidentally did the same thing on your website
  • No access to IT resources: Web Analysts may know some JavaScript, but we mostly are not IT people, so if you are testing web analytics code you sometimes have to wait for your IT guy to upload every little code change. An absolute killer for continuous improvement!
  • Testing on a test system isn’t the same as on a live system: There might be other scripts that are being loaded on the live system, the test system might be on another subdomain etc… Things that can be crucial for your code to function.
You can certainly name several more reasons why debugging the old-fashioned way is a very frustrating and time-consuming exercise.
 
Common Debugging Tools 
There are some good tools out there to switch on the light in the tracking code’s black box:

Fiddler2
My absolute favorite (see next post on how to use this HTTP traffic monitoring tool). Fiddler2 makes it easy to view every request to Google Analytics (and any other javascript-based Web Analytics tool). You can even try out changes to your tracking code on your live system before releasing them to everyone, the tool is independent from browsers – and it is free!

Web Analytics Solution Profiler (WASP)
A well-known Firefox add-on by Stéphane Hamel that now belongs to iPerceptions. It recognizes a wide array of Web Analytics Tools’ tracking codes and shows you if your tracking code is successfully being executed (or not), crawls your site to find untagged pages, and so on.

A drawback is that it only works in Firefox, although it allows you to fake another user agent (like “iPad” or “Internet Explorer” which can be cool.

The basic version is free, but to be honest, it doesn’t help me that much for my use cases. Maybe I am too stupid to use it the right way, my use cases aren’t the ones the tool is made for (like using several web analytics solutions on one website), or I should try the paid versions.
So feel free to share your experience with WASP here in the comments.

Charles Debugger
A tool similar to Fiddler2, see this blog post on how to use it for Web Analytics Code Debugging.

Firebug/Chrome Developer Console:
A tool that makes any JavaScript Debugging so much easier, so it is a must-have for Web Analysts, too. And if you use Chrome, you don’t even have to install anything, not even a browser add-on (see this video by a Google Chrome Developer with 12 tricks to get the most out of the Developer Tools). That helps when you have to debug on someone else’s computer for example.

The function I use most of the time apart from the Console (where errors are being logged) is the Network Tab. It can tell us if the tracking beacon has been sent to Google Analytics successfully. To find out, look for the __utm.gif request. If it displays a “200 OK” status code (see the green light in the screen shot), you know that Google Analytics has received the current Pageview or Event. You can take a look what is inside that request in the “Headers” tab (Cardinal Path’s Kent Clark’s marvelous “Cheat Sheet” helps interpreting the values).

Chrome GA Debugger / ga_debug.js
Google’s recommended debugging tool for Google Analytics is Chrome’s Add-On “GA Debugger”. It is basically a form of using the “ga_debug.js” script without having to alter your page’s code at all (if you use ga_debug.js, you will have to change ga.js into /u/ga_debug.js on every page you want to debug). Chrome GA Debugger is a nice and easy-to-use tool that logs every Pageview and Event that you send to Google Analytics in your Chrome Developer Console (right-click on any part of the page => “Inspect Element” → go to tab “Console”):

Chrome GA Debugger shows you in an easy-to-read format what is being sent to Google Analytics without having to understand or inspect cookie variables or the Network Tab of your Console. It gives you hints like:

  • Does my visit have the correct source/medium/campaign?
  • Are there pages that accidentally override those sources?
  • Are there pages where conflicting JavaScript or other reasons hinder the Tracking Code from being executed?

I am not using Chrome GA Debugger much anymore though because:

  1. It does not help with most cases of Event or Virtual Pageview Debugging. Events or Virtual Pageviews are most often tied to a click on a link (if you want to track the clicks on outbound links for example). If you click on a link though, you usually get to a new page, in which case Chrome’s Console is being cleared – and the Event Tracking call with it. So before you can take a look at what is being logged, it is gone. EDIT: As Judd Lyon noted in the comments, you can keep the Chrome console from clearing the ga_debug info by enabling “Preserve Log upon Navigation” in the Chrome Develepor Tools settings. You can access the settings via the cogwheel icon in the lower right corner.
  2. It is Chrome-only. What works on Chrome doesn’t necessarily work on Firefox or Internet Explorer.
  3. It breaks down sometimes, especially if you click quickly from page to page. And once it has broken down, nothing is being logged anymore even if you click slowly again to ensuing pages. That freaked me out because it always made me wonder whether my code wasn’t working well. You can easily restart the tool though by reloading the current page, but, even so, that is one factor that caused me to rarely use Chrome GA Debugger.

So much for a brief overview on the matter and a deeper look into Chrome GA Debugger. In my next article, I am going to show you how to effectively use Fiddler2 on some real-life examples.

New Video Tutorials – Using Google Analytics to track on-site campaigns

We learn so much by reading, but humans are visual creatures, and there are times when a video makes learning a new point easier to understand. In essence you’re watching over someone’s shoulder, albeit remotely, as they walk you through the information and explain how it works.

So we are delighted to advise that two videos have been added to the series on
Tracking on-site campaigns with Google Analytics

1. Tracking on-site campaigns with Google Analytics: The pros and cons of In-Page Analytics

Lukas explains what is meant by on-site campaigns and how to work out what links on your site (your on-site campaign) are clicked on by visitors. The three most common methods are In-Page Analytics, Event Tracking and URL Parameters and this first video is looking at In-Page Analytics.

In-Page Analytics are built in as part of Google analytics, you don’t have to set up anything once you’ve got your Analytics sorted. Accessing and understanding the data is not hard, they are very user friendly with the data shown as an overlay ontop of your actual web page.

This user friendliness does come at a price and it is important that you are aware of the limitations before deciding to use this as your tracking method. The second part of this video will explain each of the limitations and why it is a limitation so you can make an informed decision on whether this tool is suitable for your needs.

2. Tracking on-site campaigns with Google Analytics: The pros and cons of Event Tracking

This method does require some preparation work. You need to add so-called “event tracking calls” to each of your on-site campaign links. You can do that manually or use a ready-to-use script that does this automatically. Lukas explains the steps you need to take to get this script working.

However, once you have completed the preparation you have access to more functionality than with In-Page Analytics. These include filtering the campaign clicks links, eg by outgoing and destination page, retaining historical data and being able to export the data. Also, it is no problem to track links to outbound or subdomains. As you would expect, with more powerful functionality there are more complicated cons to be aware of relating to the preparation/set up and how the functionality works. Having said that, it is a very manageable way to analyze your on-site campaigns and can be used as an alternative or addition to In-Page Analytics.