HOW-TO: Tag Social Media Links for Google Analytics
Way back I wrote about measuring your social media success with Google Analytics. This post proved very successful and got a lot of feedback. However there’s a little “but” with analyzing visitors from social media by referrers. Stéphane Allard pointed out in comments that a lot of visitors use desktop or mobile clients. These social media visitors will register as direct traffic in Google Analytics.
In our website we estimate that more than half of visits from Twitter are shown as direct traffic. As you can see from the image, when we had a peak in Twitter then direct traffic grew more than referrals and we saw only 8 percent of visitors coming from Twitter. To find out more about this read Thomas Baekdal’s Don’t Trust Your Social Referral Data.
However there’s a way to register those visits as non-direct if you add special Google Analytics tags to the original link. Below is the link tagging tool that lets you tag all the links you put into social channels. This ensures that you know where visitors are coming from.
Here’s a step by step guide how to tag your links for social media sites (this can also be used for other sites and email).[gatool]You are done! Now when people click on the link you created it will not be logged as direct traffic even if they do it in the desktop client
Additional information about the fields
Media Channel (utm_source)
Required field. utm_source tag defines the channel where you put the link. Media channel can be various social networking sites, web portals, email, etc. You can see the results of this tag in Traffic Sources report. Example: utm_source=Facebook, utm_source=Twitter, utm_source=OurNewsletter
Media Type (utm_medium)
Required field. utm_medium tag lets you define in what form the link is presented. Media Type can be statusupdate, tweet, email, etc. The default media types in Google Analytics are organic and referral. Example: utm_medium=tweet, utm_medium=textad, utm_medium=email
Not required. Use utm_term if you want to differentiate between links that are shown in searches for specific keywords. Google Adwords does this automatically. This tag is needed for search advertising where the search engine itself does not tag the links. Example: utm_term=product1, utm_term=service2
Not required. Use utm_content for different links that are in the same media channel. If you tag links for Twitter then the channel and type are always the same but the content changes. You can see what content generates the most clicks from Google Analytics Traffic Sources > Ad Versions report. Example: utm_content=GAtweet, utm_content=FBtweet
Campaign Name (utm_campaign)
Required field. Use utm_campaign tag for different campaigns to give you a better overview of what media channels and types are related to your different activities. A campaign can be Blogging, Newsletter001, FacebookPromo, etc. You can see how your campaigns are doing in Google Analytics Traffic Sources > Campaigns report. Example: utm_campaign=Spring11, utm_campaign=RegularBlogging, utm_campaign=Email01