Update, mid August 2011
Wow, just two years after I wrote this Twitter are finally doing what’s suggested here, through the use of their own URL shortening service, they’re ‘owning’ the clicks. Read more in this post by Tom Critchlow of Distilled.
So Twitter are spending time amping up the retweeting functionality on the site and in the API. All well and good but that’s not really going to make a huge difference.
Here’s an idea that will benefit both Twitter and webmasters the world over

If you use Twitter via the web interface and click a link in a tweet, most URL shorteners (which is how most links are presented in tweets) correctly pass the referrer value in the format ‘twitter.com/username/’ or if from an individual tweet: ‘twitter.com/username/status/tweetid/’.
If you’re using a third party Twitter client and you click on a link, no referrer information is sent with that to the site you visit. In terms of analytics, that information is lost, so that traffic is presented as direct traffic.
As Twitter grows in reach and more users switch from using the Twitter web interface to clients like TweetDeck, Nambu, Tweetie etc and the myriad mobile clients, the scale of this problem will continue to grow.
Why would you (as a website owner) care?
Because knowing where your traffic is coming from allows you to understand your visitors better, segment them better and improve your site. It also allows you to know the true efficacy of your efforts on twitter – are these links you are sending out, links that have been created by others, or retweeted?
There are three technical approaches to solve this:
- Twitter clients parse the unshortened links through the unshortening APIs provided by the URL shortening services. Some already perform this function anyway. They could then put a ‘utm_medium’ parameter on the URL. See the Google Analytics documentation for more about utm parameters.
- URL shorteners could all be required to add/replace utm parameters in the URL with those specified by the twitter client – which will add the parameters: utm_medium = twitter, utm_source = /username/.
- Twitter clients could be compelled (want API access for your app? Gotta play by the rules) to send any links via a redirection page on Twitter that matches at least the user, maybe even the tweet id of the tweet the link was in. That page would set the browser’s referrer at that point, allowing any analytics package at all to correctly attribute the traffic as a referral from twitter.com.
The problems with methods 1 & 2
utm values are a kludge and not well understood/universally accepted
Using utm parameters simply isn’t something that every web analytics person is up to speed with. Not everyone has read Web Analytics an Hour a Day and gone into painstaking detail. Most people are new to this stuff and they look at the pie chart of direct vs organic vs paid vs referrals and that’s as far as they want to go. It also creates very ugly less sharable URLs
Too many people involved
Requiring Twitter client developers AND URL shortening services to change the way the work is a bit much – plus there’s no enormous benefit to the URL shorteners to get involved. Let alone the number of white label/roll your own URL shorteners that have sprung up since the talk of tr.im shutting down and people realising that they don’t own their short URLs.
Why don’t people posting links put the ‘utm’ parameters for analytics onto the long-form link before shortening?
This doesn’t necessarily solve the problem – it assumes that the shortened link is never going to be shared in another medium – someone could take a shortened link used in a tweet, paste it into a facebook comment. Voila, different medium, same utm value. Then there’s the issue that is only relevant for links that you create yourself. No regular person will go and tag these values on the end of a link to be shortened.
Twitter taking credit for links, as the referrer, is the only sensible solution
- It requires no learning on the part of the vast majority of web analytics users, putting information into a recognisable universally understood format
- It underlines the importance of Twitter as a traffic acquisition medium
- It gives website owners a true picture of where their traffic comes from
So, Twitter, quit messing around with the ego-massaging retweeting changes and do yourselves a favour – put your stamp on the traffic you bring to people.
Image credit: Elvis Payne


