Take a look at this screen shot from my Google Analytics dashboard.
These are all click-throughs from tweets. They are all referred by Twitter’s URL shortener (t.co). Unfortunately this data is fairly useless. I’d like to know who the influential tweeters are and what the tweets said. I could search Twitter for the full URLs, but Twitter search is – quite frankly – rubbish for this.
My initial reaction to this vague and seemingly obfuscated data was annoyance, but after doing some research I now see that this data is actually a bonus. That doesn’t mean it can’t be improved though.
How referrer tracking normally works
If the request to t.co contains a ‘Referer’ (sic) header, Twitter responds with a regular HTTP redirect. This type of redirect keeps the original referrer intact and so that is what goes into your web stats. This is what we’d like ideally like to see – to be able to click through to the actual tweet.
URL shorteners have their critics, but shorteners don’t in themselves prevent us seeing where our traffic originally came from.
There are circumstances under which your browser won’t send the original referrer to t.co when you click a link –
- If you’re not clicking from an actual Web page. (e.g. from an app or Twitter client)
- If you’re clicking from a secure web page (e.g. https://twitter.com/)
You’ve guessed it; this accounts for the huge majority of clicks from Tweets. Possibly all of them.
So why are we seeing t.co at all?
Without the referrer header, your stats would show these clicks as ‘direct traffic’. The reason t.co shows up at all is because Twitter do something different to other shorteners such as bit.ly.
A purist might argue that this breaks the web, but from an analytics perspective this is more useful than the clicks showing up as ‘direct traffic’. At least we know they’re from tweets.
Room for improvement
Obviously there are privacy issue with tracking users’ clicks, (hence the missing referrer in clicks over SSL) But for people with a public Twitter timeline it would be very handy if Twitter could provide richer data in t.co links beyond just where they link to. This could simply be
X-Twitter-Tweet-Id headers in the response showing who originally shortened the URL and/or who is passing it on.
An API for this would be ideal, but of course Twitter have their own Analytics system, so I don’t expect they’ll want to make t.co any better for the non-paying customers.
Campaign tracking on the cheap
If you use Google Analytics and don’t pay for any fancy social media management tools, it’s very easy to embed Google Analytics campaign tracking tokens into your original URL.
This is the URL I use in my Twitblock tweet button:
All traffic clicking on the shortened t.co links will show up in the Campaign section of your traffic sources. If you forget the names of the parameters you can use this handy link builder.