Monday, July 6, 2009

Track Facebook, Twitter & Social Networks in Google Analytics (Part 1)

A cornerstone of any organization’s overall social marketing strategy should be reliable web analytics – that is, accurate tracking of traffic coming from networking sites on which you’re conducting marketing efforts. This will enable you to slice and dice statistics for those visitors, and hopefully align those numbers with your marketing goals - when a client comes to us and wants to engage in some form of social media marketing, this melding of analytics and strategy is always paramount.

Google Analytics will automatically track referrals from other websites, including Facebook, LinkedIn, and other networking sites. In your reports, you’ll see something like this:

However, these sites are grouped in with all other referring traffic! What if you want to track statistics for incoming traffic from ALL social network sites? It’ll be hard to do that if you have to sift through all your other referral traffic.

Additionally, how can you track what exactly someone clicked on to visit your page? Wouldn’t it be nice to know which of your Twitter posts (ah yes, which “tweet”) generated that $500 purchase?

With a few tweaks, we can track exactly that in Google Analytics.

Grouping Social Network Traffic in Google Analytics

Google naturally defines traffic as being organic, direct, referral, etc – so what we’re doing here is telling Analytics to place certain sites within a certain category, or “medium.” Chances are, this is how your Traffic Medium report looks right now:

Organic traffic covers non-paid visits from search engines, (none) means direct traffic (IE, a visitor typed in your website’s address directly), and all your social networks are grouped under referral traffic.

We want a separate category for those sites though! Using a filter, we can tell Analytics to remove specific sites from the “referral” classification and group them under a new medium.

(Note: This technique involves creating a filter. Create a duplicate profile (how?) before proceeding – any mistakes can screw up your historical data. We’ll install the filter on the new, duplicate profile.)

Once you’ve got the profile set up, click “Filter Manager” from the Overview Screen (the one that lists all your profiles), then “Add Filter”:


Name your filter something descriptive, then select “Custom Filter” from the Filter Type drop down box. We are advanced analytics ninjas, so select the “Advanced” button and configure the filter like so:

The “Campaign Source” and “Campaign Medium” fields can be customized based on your site’s traffic – in this example, we’re pulling any referrals that contain “Stumbleupon” or “ezinearticles”, and we’ve grouped them using the Regular Expression character “|” (directly below your Backspace key), representing “or”.

So, to pull out all traffic from Facebook, Digg and Twitter, I would type “face|digg|twitter” into this field – any referrals that contain these terms (“face”, or “digg”, or “twitter”) will be grouped into a new medium called “social network”.

After you’ve applied the filter, you should see this spiffy little line in your Traffic Medium report:

…and presto! Your social network traffic is grouped in one distinct category, separate from your Google Image referrals (man, that’s a lot of cat pictures).

In part 2, we’ll talk about tracking visitors down to more specific sources, enabling us to answer questions like “Which tweet drove more visitors, the one about lunch or the one about that jerk-face Bryan from accounting?” and “Does anyone really care about my Facebook status?” Stay tuned!

Note: Part 2, Facebook, Twitter, and Google Analytics is now up.

Labels: , , ,

1 Comments :

Anonymous Anonymous said...

This was a very helpful article. I really appreciate having easy to follow directions for something that is so useful. Thanks!

July 28, 2009 3:59 PM  

Post a Comment

<< Home