Stop Giving Away Your Twitter Traffic in Google Analytics!
Are you in the middle of running a twitter campaign? Are you seeing significantly less twitter traffic than you were hoping? Before giving up on your twitter campaigns you should make sure that the data youre analyzing is accurate!
First lets check the traffic we are currently recording as twitter traffic, from the GA dashboard:
- Open the Traffic Sources Report
- Open the Referring Sites Report
- Filter the source to include twitter.com
This should be all of my twitter referrals right? Nope! A Majority of twitter referrals will show up as Direct Traffic in Google Analytics!
Well how can this be?
Most twitter users do not use twitter.com itself; they use applications such as Tweetdeck. When a user clicks on a link in one of these 3rd party apps since they are not in a browser they do not send any referring information. When Google Analytics doesnt receive any referral information it puts all of these visits (your twitter referrals) into direct traffic.
Below is an advanced segment which shows this in action:
(Image no longer available)
You can clearly see that a small increase in twitter referrals can actually correspond to a much larger increase in direct traffic!
Fortunately there is a very easy way to fix this! Before you shorten the URL in twitter add the parameter utm_source=twitter, being careful to include the & or ? as necessary to mark this addition to the URL as a parameter. Now whenever anyone clicks on a link in a 3rd party app, the Google Analytics will record the visit as coming from twitter instead of as a direct visit.
Want more information than that? You can add another parameter such as utm_campaign=CAMPAIGNNAME switching out CAMPAIGNNAME for the name of the twitter campaign you are currently running. Now not only are you correctly tracking your twitter traffic but you are following Avinashs Rule Segment or Die!. This is particularly useful if you run more than one twitter campaign at once and need to be able to tell which of the campaigns is the most effective.
Have you launched any twitter campaigns recently? Did you tag the URLs correctly? Look back through your Google Analytics data and see if you get any spikes in direct traffic the same time you get spikes in twitter referrals. If so you may have under-estimated the value of your twitter campaign!
Posted: 08.17.10

Israel:
Very helpful!
What about the links you can’t control? Is there a way to identify them as Twitter not as Direct traffic?
Andrew Burke:
@Israel
If you cannot add parameters to the link and the visitor does not send referral data, like twitter apps, I do not think there is a way to identify them as Twitter and not as Direct Traffic. If anyone has found a way, feel free to comment!
Eric Wittlake:
@Isreal, when you are counting on people in your audience to share links to a specific post or article, the coding referenced here will capture a portion of traffic.
One additional step you can take is to make certain you set up click tracking everywhere you can control it, particularly for other direct entry sources (like email or RSS feeds). As long as you are sending traffic to a deeper page in your site, you will likely see spikes in direct entry traffic to the promoted page strongly correlate to the overall social traffic you can track with the URL encoding Andrew posted.
Andrew Burke:
@Eric
You are absolutely correct, you can add these parameters to any medium you expect direct traffic from, be it RSS feeds or emails. This will help you to better track the overall effectiveness of the campaign, and not just it’s effectiveness on twitter.
Garious:
That’s a curious thing. I wonder how you can control or filter those direct messages as the last thing I want to receive is a message that looks like a Twitter version of Google Adsense. If I were shopping online at that moment, I’d appreciate all those coupons, freebies and stuff. Still, it can be time-consuming to just read them all.
web design in Maidstone:
wow.. never knew that twitter visitors show up as a direct traffic…
thank You for sharing
Helmut from the UK
p.s. thank You for great tut videos as well :)
Andrew Burke:
@ Garious you shouldn’t receive any direct messages with this setup. This will allow you to track your twitter referrals in Google Analytics as twitter, instead of as Direct traffic. Hopefully this will help you figure out which of your twitter campaigns are the most successful!
@Helmut, Glad to help!
Carol F:
So this issue of direct vs. referral — is it the same for Hoosuite or Social Oomph?
Ian Greenleigh:
Just wanted to leave a quick thank you for writing this. You saved me a huge headache, and now I can actually report up good results from our social efforts.
Cheers.
omer:
i am using twitter and facebook links on my site, http://www.sholod.com. And i was seeing a lot of Directs as sources in the google analytics. this article is just for me. thank you…
Michel ozzello:
Wil,
I thought that, in order to make these URLs work you need to always define the utm_source, utm_medium and utm_campaign.
In fact, if you go to the URL Builder tool page, Google marks these parameters as mandatory.
Am I looking at this the wrong way?
Will Google Analytics tracking work if we only add the utm_source?
Thanks,
Michel
Drew:
I’m confused by the note below:
add the parameter utm_source=twitter, being careful to include the & or ? as necessary to mark this addition to the URL as a parameter.
What do you mean by adding “&” or “?” to the UTM?
Michel Ozzello:
Drew, what he means is that if the URL already has parameters, you’ll have to use an &.
If there are no parameters yet, then you should use a ? (which is the character that indicates that from that point on you will have parameters.)
If the url is
http://www.yoursite.com/yourpage?param1=value1
then you need to add the utm parameters with the &
http://www.yoursite.com/yourpage?param1=value1 &utm_source=x&utm_medium=yutm_campaign=Z
If the url is
http://www.yoursite.com/yourpage
then you need to use ?
http://www.yoursite.com/yourpage?utm_source=X&utm_medium=Y&utm_campaign=Z
Let me know if this is not clear.
Cheers
Michel
Michel Ozzello:
Just realized I made a couple of typos in the URLs above… that’s what happens when you’re typing with no light! :)
Sorry about that, but I hope you understood what I meant.
Cheers
Michel