Most of you are already accustomed with URL address shortening services. You know, those websites which make your URLs short and ugly so you can post them on Twitter, Facebook or just send them to a friend. The thing is you never know where these links end up and how much traffic they drive. For me, working in web analytics, not knowing something like this is itching like hell, so I have decided to find a solution to it.
What I did is create a special GreaseMonkey script for Firefox (you need to have GreaseMonkey installed), which offers the possibility of adding Google Analytics variables in order to easily track all the users clicking on the short URL you are just about to generate. Here is how the the new http://is.gd homepage will look like after you install the script.
As you see, you have the possibility of adding 3 new fields: Campaign Source, Campaign Medium and Campaign Name. Filling in these fields will allow you to see all the visits generated by this link in Google Analytics. For example, I am going to tweet about this blog post on my twitter account and I will use the following data:
Campaign Source: Twitter
Campaign Medium: social-media
Campaign Name: Twitter-Analytics-Blogpost
If you want to know more about how to customize your links for analytics purposes, Roievolution.com has a great post on link tagging for Google Analytics.
Tomorrow, when I’ll get to office, I’ll login to my Google Analytics Account and will be able to see all the visits triggered by the Campaign Twitter-Analytics-Blogpost under Traffic Sources > Campaigns.
The beautiful part now is that in Google Analytics I will be able to segment all the traffic I have generated with this post and see if I did a good job in providing the content and experience in order to engage you.
The script works for any of the following shorten URLs websites:
Of course you already know about my love for Firefox and the great community that supports it. And then it’s Twitter, Facebook, WordPress and the list can go for miles. I am using all of these and they make my work easier and more pleasant, so today is my turn to give something back to the open web.
If you would like me to add improvements to the script, make it available even for more ShortenURL services or if I can be of help in any way please tweet me (@cllaudiu) or just leave a comment to this post. Your feedback would really make me feel good about it :).