Author Archive

How do I track that little Facebook “Like” button in Google Analytics?

Friday, August 27th, 2010 by David Booth
Google Buzz

We get asked very often how to track Facebook “Like” buttons inside Google Analytics, so here’s a post that will show you how to do it.  There are basically three steps – first, you need to get the Like button on your pages using the XFBML / Javascript version of the Like Button.  Next, you’ll need to fire some Google Analytics code in a Facebook event that tells us when a successful “like” action has occurred.  Lastly, you need to find where it all ends up in Google Analytics and take action based on your new data!

1. Get a Facebook Like Button on your page(s)

The first step is to actually get a Facebook Like Button on your page. The quickest way to do this is to go here:

http://developers.facebook.com/docs/reference/plugins/like

Just fill out the form and click the “Get Code” button…you’ll see something like this pop up:

Tracking Facebook Like Buttons with Google Analytics

Now, you’ve got two options here. The iFrame version is admittedly the easiest to install, but unfortunately you don’t have any way to track when someone actually clicks and successfully “likes” your page as a result. There’s no onClick event you can use for an <iframe>, or for a <fb:> tag for that matter. And even if you could, the click itself doesn’t tell you if someone actually successfully liked your page or not – remember, they have to log into Facebook first, via a popup that might even be blocked in some browsers, so your click and Like counts may be very different.

So instead, we’re going to use the XFBML version (highlighted).

To implement this, you’re going to need to use the Facebook Javascript SDK – basically it works like this (and you can view the source of this page – you’re looking at a working example):

  • Update your <html> tag to include
  • xmlns:fb='http://developers.facebook.com/schema/' xmlns:og='http://opengraphprotocol.org/schema/'

  • Add the proper Open Graph Protocol meta tags – this is not necessarily required but a good thing to do.
  • Reference the Facebook Javascript library – we recommend you use the following asynchronous version (make sure to put your own App ID in there):

  • <div id="fb-root"></div>
    <script>
    window.fbAsyncInit = function() {
    FB.init({appId: 'INSERT YOUR APP ID HERE', status: true, cookie: true,
    xfbml: true});
    };

    (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
    '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
    }());
    </script>

  • Add the XFBML that you generated above (make sure to update it with your own page URL as the source and add any available attributes you might want) where you’d like your button to appear on your page:

  • <fb:like href="http://www.somesite.com/somepage"></fb:like>

2. Fire a Google Analytics Event when a “Like” action occurs

OK, at this point you’ve got your Like button up and running. Now in order to track these in Google Analytics, we’re going to use Event Tracking to fire an event whenever someone successfully Likes the page. You can choose to set this up in whatever hierarchy you like, but here’s one you might want to use:

Category: “facebook”
Action: “like”
Label: URL of the page that was “liked”

Using the _trackEvent() method of the pageTracker object, the Google Analytics javascript code would look like this:


pageTracker._trackEvent('facebook','like', href);

Note: This is the synchronous version of the Google Analytics code and assumes a javascript variable called href contains the URL of the page that’s being “liked”

So the last step in this process is to actually fire this code only when a successful Facebook like occurs. To do this, we’re going to subscribe to an event that Facebook exposes to us when the successful “like” action occurs. When we detect that event, we’ll fire our _trackEvent code. Here’s the code that will do it:


<script>
FB.Event.subscribe('edge.create', function(href, widget) {
pageTracker._trackEvent('facebook','like', href);
});
</script>

Note: The safest placement of this code is somewhere BELOW your standard Google Analytics tracking code – this will ensure that the pageTracker object has been defined before you try to use it

That’s it!  Feel free to get creative here…want to use a Custom Variable to create a segment of either visitors (scope = 1) or sessions (scope = 2) that “Liked” something?  Then all you would have to do is something like this (make sure your slot 1 is available and you want this at a visitor scope for the exact code below):


<script>
FB.Event.subscribe('edge.create', function(href, widget) {

pageTracker._setCustomVar(1,'facebookLiker','true',1);
pageTracker._trackEvent('facebook','like', href);
});
</script>

Want to stick this data into a database so you can use it for any number of customized reasons? Just fire some AJAX in there. Just about anything you can accomplish with Javascript can be done with each Like event.

3. Find that data in Google Analytics and USE it!

Now, you can log into your Google Analytics account and head over to the Content > Event Tracking reports and take a look at the Categories, Actions and Labels as you’ve defined them:

Event Tracking for Facebook Like Buttons in Google Analytics

Note that here we’ve drilled down to the Category of “facebook” and the action of “like” – now we’re looking at a list of the URL’s we passed in – or in our case the actual blog posts that people “liked.” They’re a bit ugly since they’ve been formatted for proper URL encoding, but hovering over the label itself will let you see the URL that was “liked” pretty clearly.

So what do we do with it?

Well, this is one more set of data that can be used to identify what content resonates with your user base.  Which are the popular themes of blogs?  Which are the authors that our visitors like the best?  Which topics do people like to read about?  We can look at the Site Usage tab right here to understand if people who like certain blog posts are any more engaged (think bounce rate, time on site, average pageviews per visit) than others.  We can look at our Ecommerce tab and find out if people who like certain pages are more or less likely to, say, sign up for one of our live Google Analytics or Website Optimizer Seminars for Success trainings.  With this knowledge, we can tailor the content that we write to the things that people like the best and the things that get people to engage with our site and convert on our goals.

And don’t forget about your Advanced Segments! Below you can see a quick Advanced Segment configuration that will quickly let you compare those Facebook Likers to any other segment of traffic you care to define:

Google Analytics Advanced Segment for Facebook Like Button users

Hope this helps a few of you out, and we’d love to hear how you’re using this in the comments!




David Booth
David is a co-founder and principal consultant at WebShare. You can find out more about David here.

See more posts by David Booth

Quick Reference – language codes for Google Analytics reports

Wednesday, August 18th, 2010 by David Booth
Google Buzz

Here’s a quick list of the language codes that Google Analytics uses in the Visitors > Languages report:

http://www.websharedesign.com/tools/google-analytics-language-codes/

While you might know most of the ones you routinely see in your reports, every once in a while it’s nice to have a quick reference handy for that one you don’t recognize or just aren’t sure of, so bookmark away!




David Booth
David is a co-founder and principal consultant at WebShare. You can find out more about David here.

See more posts by David Booth

Famous Clients

Wednesday, May 26th, 2010 by David Booth
Google Buzz


We’re proud to be able to work with incredible clients – the kind of folks that not only walk on the cutting edge of innovation, they define it.  As part of National Small Business Week, Ross Twiddy of Twiddy & Company will be on Capitol Hill telling the story of how a 32 year old business is leveraging the Google platform to fuel the kind of growth that has resulted in the $54 billion economic impact Google has just reported for 2009.

Twiddy uses AdWords to drive traffic to its site, where almost 900 of North Carolina’s Outer Banks vacation rentals are ready to be browsed and rented.  A comprehensive installation and the use of advanced features of Google Analytics collects the data needed to make both everyday and complex business decisions, and Google’s Website Optimizer conversion testing tool has been used to run experiments that provide an ever improving user experience and impact to the bottom line.

According to Ross, “Adwords has been an extremely powerful platform for our small business. WebShare has been instrumental in optimizing that traffic–Webshare’s strategy and advice is the supercharger for Adwords traffic.”

Well Ross, we’re proud to work with you, wish you well on Capitol Hill and congratulate you on your successes!

UPDATE 6/16: Twiddy getting some more coverage on the Official Google Analytics Blog!




David Booth
David is a co-founder and principal consultant at WebShare. You can find out more about David here.

See more posts by David Booth

The Newest Addition to the WebShare Team

Tuesday, April 6th, 2010 by David Booth
Google Buzz

Today we’re very excited to welcome the newest addition to the WebShare team: Justin Cutroni, Director of Digital Intelligence. Justin is a highly-respected thought leader in the world of web analytics, and with his experience added to the rest of our team, we expect WebShare’s industry-leading programs in web analytics and business intelligence to become even more effective.

Learn more about Justin by bookmarking his blog, and watch out for Justin at a Google Analytics seminar near you!

To learn more about the rest of the WebShare leadership team, feel free to review our team bios here. And to stay up to date with all of our latest analytics tips, tricks, and best practices, subscribe to our feed or follow us on Twitter!




David Booth
David is a co-founder and principal consultant at WebShare. You can find out more about David here.

See more posts by David Booth

New Google Analytics Features Announced at SES Today!

Monday, December 7th, 2009 by David Booth
Google Buzz

Fast on the footsteps of the feature announcements made at eMetrics in October, and just a week after the announcement of the new asynchronous tracking code, yet another set of announcements came today at SES Chicago. Here’s a brief recap:

Annotations:

We love this one, and after using it for a while, we can’t really remember the life of an analyst without it. Now you can leave notes in the top graph of your reports to explain what happened when, who did what, when that fantastic promotion was blasted out, and anything else you can dream up. Here’s a quick screenshot:
Google Analytics Annotations - new feature for taking notes in GA

Custom Variables now in Custom Reports & Advanced Segments:
Custom variables now in Custom Reports and Advanced Segments
Custom variables, announced just a little over a month ago, are now available for use in Custom Reports as well as Advanced Segments. This is great news since for most folks the announcement made in October meant that you could start collecting data for custom variables, but showing it in your reports was limited to just the standard Custom Variables reports that were rolled out in the weeks after the announcement.

Now, you can use your new custom variables to slice, dice, cut up and show in whatever context you like in custom reports, or define segments on the fly based on your custom variable definitions!

Google Analytics Setup Wizard

Sure, you can slap on the code and start collecting some data, but if you have some advanced installation situations (like crossing top level or subdomains, specific PHP considerations, alternate campaign tags, cases where Urchin is also being used, mobile application tracking, and more), how do you know how to change your code?.

Well, here’s a screenshot of some of the advanced situations where you can use the new Setup Wizard to help you generate customized Google Analytics Tracking Code (GATC), but remember, we always suggest reviewing this code and installation instructions to ensure that it’s going to accomplish exactly what you want it to:
Google Analytics new Setup Wizard

Google Analytics API Updates

There are a number of updates coming to the Google Analytics API, and we’re very excited to see all the ways people start using this new functionality. Here’s one we can share with you early:

Advanced Segmentation is now supported via the Google Analytics API!

Later this week, look for the official announcement of the full new set of updates to the Google Analytics API.




David Booth
David is a co-founder and principal consultant at WebShare. You can find out more about David here.

See more posts by David Booth

Free Google Webinar – Planning & Running Your First Website Optimizer Experiment

Tuesday, September 22nd, 2009 by David Booth
Google Buzz

Google and WebShare’s David Booth are teaming up to offer a free webinar on Thursday, September 24, 2009 at 10:00 am (PDT):
Planning and Running your First Website Optimizer Experiment.

Google webinar - Planning and running your first Website Optimizer experiment

Sign up for this webinar!

This 90 minute webinar is targeted at anyone who’s ready to get started with A/B and Multivariate testing using Google’s free Website Optimizer tool.  The topics we’ll cover are based on trainings we’ve delivered at Google offices across the country and as part of the live Google Seminars for Success training series that continues to hit cities across North America.  Join us for this live webinar and learn:

  • Landing page testing basics – what is it?
  • Identifying test pages and planning for your first experiment
  • How to set up and run A/B and Multivariate tests
  • Live demos of both A/B and MVT experiments
  • Reading the reports and understanding the test results

There will be 30 minutes of questions and answers with Google’s Trevor Claiborne and Andrew Gomez.

Hope to see you there!




David Booth
David is a co-founder and principal consultant at WebShare. You can find out more about David here.

See more posts by David Booth

Major Upgrade to Google Analytics Announced Today

Wednesday, October 22nd, 2008 by David Booth
Google Buzz

Analytics is all about insights, and the insights Google Analytics provides about your site just got a lot better and easier to find.  Google announced the release of several new functions to GA today.

The following features will be available on all accounts in the coming weeks:

1) Advanced Segmentation: You will definitely want to check this one out as soon as it is available in your account.  New predefined segments are easy to apply to both current and historical data.  And even better, the new segment builder tool lets you create, save and apply your own custom segments with incredible ease.

2) Custom Reports: Now you can have your GA reports your way.  This new feature allows you to create, save and edit reports that are completely customized to your needs.  With the new report creation interface being so simple to use you might not want to stop creating new ways to analyze the interactions your visitors have with your site.

3) Motion Charts: Put your reports into motion and sit back and watch your data change over time.  The new visualize button at the top of the reports allows you to analyze data over 5 dimensions (x-axis, y-axis, bubble size and color and over time) and pick up on relationships that may not be easily seen in traditional reports.

4) New Account Management Dashboard: Managing and monitoring your accounts just got easier with this new dashboard.  You will also get key performance metrics in green (for good) and red (for bad) upon logging in so you can see what areas might require a little extra attention right away.

These functions will require a little longer wait as they are in beta testing and will be released to all accounts more gradually. But if you are working with a Google Analytics Authorized Consultant ask them to set you up with early access.

1) Data Export API: This will allow developers to take Google Analytics to whole new levels.  Custom dashboards, offline analysis; the only limitation could be your imagination.

2) Integrated Reporting with AdSense:  If you are an AdSense publisher you will soon be able to track your revenue and impression data right along with your site data.

These are some great new functionalities that you will definately want to spend some time becoming acquainted with once they are available in your account.




David Booth
David is a co-founder and principal consultant at WebShare. You can find out more about David here.

See more posts by David Booth

Google Analytics Benchmarking and Opt-In Settings Released Today

Wednesday, March 5th, 2008 by David Booth
Google Buzz

Today Google announced the release of some interesting additions to Google Analytics, the free website analytics offering from the search giant. Almost as many times as the topic of Google Analytics comes up, we’re asked whether or not Google is poring over your private data and sharing it among its secret circles in dark caverns. While the answer to this question has always been a resounding “no”, today’s beta releases provide a case for the positives of data-sharing within Google Analytics.

Ever wanted to know if other online stores selling the same products as you also saw a record February? What days of the week other sites like yours experience traffic spikes? How about knowing if people stay on your pages longer than they stay on your competitors’ sites? With the industry benchmarking feature, you can answer these questions and more.

Google Analytics announces benchmarking feature

Understanding how your website performs against other websites in your vertical can shed some bright light on your online marketing plans, and even looking at data across other verticals can provide valuable insights that you can turn into action items for your online success.

So how does Google Analytics get all this data on your vertical? Well, the bottom line is that for this to be an effective tool, we all have to share it. The second feature released today is the beta of the “data-sharing settings” page, where Google Analytics users can opt in to sharing their data. To dispel the paranoia that is sure to result from this option, Google is NOT making your individual data available to your market (and your competitors). When you opt-in to data sharing, your Analytics data is aggregated with everyone else in your industry vertical anonymously.

So why stop there? Google is also letting you opt into sharing your Analytics data across other Google services you may be using. Have you tried the Conversion Optimizer from Adwords yet? If so, you’re probably frustrated that you have to set up separate conversion tracking for this feature when all that data is right there in your Analytics account. Cross Google services data sharing is the first step to allowing us to solve problems like this, and we at WebShare are excited to see where this leads.

Google Analytics help Webshare is a Google Analytics Authorized consultancy and can help you make the most of this new feature and the wealth of data available to you via website analytics. From website analytics training to Google Analytics consulting, WebShare can help you with all your website analytics needs.



David Booth
David is a co-founder and principal consultant at WebShare. You can find out more about David here.

See more posts by David Booth

Another Pay-per-click Option: Microsoft adCenter

Thursday, December 27th, 2007 by David Booth
Google Buzz

If you are looking for another way to expand your search marketing program, Microsoft’s adCenter may be good option. AdCenter is Microsoft’s Live Search pay-per-click (PPC) management application. As the fourth most trafficked search engine in the world, Live Search has the potential to be a high performing search marketing medium. Features of Microsoft’s adCenter include campaign importation templates, immediate editorial feedback on keywords and ads, specific ad targeting options and updated reporting capabilities. The implementation of these features brings adCenter closer to the caliber of Google Adwords and Yahoo! Search Marketing consoles. There are however, a few things to keep in mind when using Microsoft adCenter to manage your Live Search PPC campaigns.

The adCenter console operates very much the same way Google Adwords or Yahoo Search Marketing do, making it an easy transition to getting started in adCenter. If you already have PPC campaigns in Google Adwords or Yahoo! Search Marketing, you can easily import the campaigns and keywords into adCenter through the use of Microsoft Excel templates. The templates can be downloaded from adCenter, and used to help format all of your existing campaign information and keyword lists from other PPC vendors.

It has taken a while for Microsoft to catch up with Google and Yahoo!, but Microsoft finally introduced an immediate editorial feedback function in adCenter. The function makes it easier to create ads that meet the technical requirements for Microsoft’s editorial guidelines. AdCenter instantly validates ads or keywords by checking each ad to ensure it meets the following four conditions:

  1. All of the required fields are complete (e.g. ad title, ad text and destination URL).
  2. None of the fields exceed character limits.
  3. The destination URL is formatted correctly.
  4. The display URL is formatted correctly.

Passing the immediate editorial feedback validation, however, still does not guarantee that your ad will be displayed. Your ad must still meet the content requirements in Microsoft’s editorial guidelines. Content editorial guidlines cover ad characteristics such as the type of product or service being advertised and the use of trademarks in ads. Microsoft says that newly created ads that are approved usually become active within a few minutes, and that your ad was probably approved if you don’t receive a rejection email within two hours of your ad being submitted.

Microsoft hypes adCenter’s dynamic text ad and incremental bidding options, which are intended to help you further customize your ads and target them at specific times in order to increase click-through-rates (CTRs). Dynamic text ads use keyword variables to display a customized ad that is more likely to appeal to potential customers. Incremental bidding allows you to bid an additional amount beyond your keywords bid in order to increase the position of your ads and target customers by location, day of week, time of day, customer age, or customer gender. While Microsoft’s claim is true that dynamic text ads and incremental bidding can increase CTRs, it isn’t guarranteed. You should carefully examine your ad campaigns by evaluating keywords, keyword match type settings, ad position performance and budget before implementing either of these targeting options.

AdCenter’s reporting capabilities are typical of what Google Adwords and Yahoo! Search Marketing offer. Reports are categorized by report group. Each report group contains reports that are related to a specific aspect of an account. Campaign performance reports can be viewed for an entire account, campaign, ad group, ad, or a specific keyword. Custom report options include a drag and drop feature to reorder custom report columns and the ability to include totals and averages at the bottom of reports.

WebShare is a Microsoft adExcellence member.Recently, Microsoft unveiled their adExcellence program, which provides advertisers with the opportunity to hone their adCenter skills and become recognized as an adCenter industry expert. WebShare is one of the first companies in the world to become an adExcellence Member. Members of the adExcellence program must complete classroom training and demonstrate their knowledge by passing an exam.

WebShare is a Google Adwords Qualified Company and a Yahoo Search Marketing Ambassador.

In addition to being an adExcellence Member, WebShare is also an Adwords Qualified Company and Yahoo! Search Marketing Ambassador. We are recognized as a premier pay-per-click management company in the search marketing industry, and offer a wide range of PPC services that can help you increase the performance of your PPC campaigns.

 

 

 




David Booth
David is a co-founder and principal consultant at WebShare. You can find out more about David here.

See more posts by David Booth

New Comparison Feature Launched in Google Analytics

Thursday, December 13th, 2007 by David Booth
Google Buzz

Google Analytics has just put in place a new feature that will be formally announced very soon – comparison graphing for your reports.

New date compare feature in Google Analytics

For those of you that have grown accustomed to the tireless examination of your key Analytics reports day after day, this new feature is a welcome addition to Google Analytics from a usability standpoint. Whereas we have been seeing key metrics compared to site averages for quite some time now (displayed in red or green, in parentheses next to key numbers), we now have the ability to graph two metrics or two date ranges.

Ever wanted to quickly see things like:

Has all of our work paid off and did we get more traffic this holiday season than last?
Just head to your favorite traffic report and drop down your date selection box and select the two date ranges you’d like to compare. Black Friday 2006 to 2007 or any period you’d care to see.
date compare dropdown screenshot for Google Analytics date compare feature
Are more visitors looking at our December Discounts page after we highlighted it on our major landing pages last week?
Find the page in question in your content reports, set your date ranges to compare and enjoy the view!

Did that string of newspaper ads in San Francisco and L.A. get us more traffic from the state of California? More e-commerce transactions? Better conversion rates?
Just navigate to the Map Overlay report for California, set your comparison date ranges and have a look, city by city. You can use the tabs at the top to compare traffic, conversion, and e-commerce numbers over your date range and any geographic location.

Are visitors from my banner ads staying on my site longer after I made my landing pages better a month ago? Are they converting better as a result?
Have a look at the time on site column of the campaign report where you track your banner ad visitors. Conversion and e-commerce numbers are just a click away!

Comparing two metrics graph in Google Analytics

Does my G1 conversion rate trend in the same way as my G2 goal over time? What does it look like for Chicago visitors that came from a geo-targeted Adwords campaign?
Head over to your All Traffic Sources report, drop down the graph options, select “Compare Two Metrics” and pick the goal conversion rates you’d like to compare. Get even more detailed by finding the cross segment of a specific Adwords (or any other) campaign while in the Map Overlay report. Now drop down the graph options and pick your two goal conversion rates!

The answers to all of these questions can be quickly graphed right in the Google Analytics console now, and there are myriad ways to use this new feature and quickly see a snapshot of date range comparisons.

Google Analytics help Webshare is a Google Analytics Authorized consultancy and can help you set up, configure, and analyze this invaluable data. We offer customized analytics training as well as Google Analytics consulting for any project.



David Booth
David is a co-founder and principal consultant at WebShare. You can find out more about David here.

See more posts by David Booth