How to track twitter campaigns with Analytics

mouseclick

Track the clicks from twitter to your blogpost

So this is the first english post from SEO Punk. I am punky, I am funky and I want to show you today a little skript wich was inspired by Yoast. So first I have to thank him for bringing the idea up. So what’s it all about? Yoast published a short skript, that allows you to track your twitter camapaigns. Or better, You click one Button and then you get your URL postet with the analytics UTM paramters to twitter.

That was not so punky. Although it was funky. Yoast used the ?utm parameter to track the urls he shortened with cli.gs. So you might say that’s not good for SEO. Well maybe you’re right. So what to do? There’s a solution to the problem. Just use the # parameter instead of the ?.

That’s  a little bit more tricky, because you have to add a line to you analytics code. Have a look at my html-code here. There you will find the line:

pageTracker._setAllowAnchor(true);

Add it! Now you can use hash anchors to track the the utm parameters.Thanks to Mr. Analyitcs my partner in smoking crime from next week on Mr. Timo Aden, the greatest Author of all ever written books about webanalytics and number one of the alltime amazon book charts. Yes you can ignore me in twitter if you want to now 😉 I’ll pay you in cigarettes now.

Ok, that was easy huh? So lets get the firework started. I modified Yoasts Skript a little bit. Now you click on the button in your browser (ok it’s a bookmark, not a button) and it will take you to a form where some of the fields are already filled out with the params the skript knows, like the title of the post you want to promote or the url you want to promote and of cause where you want it to be promoted. On twitter! Ok, but there are some more fields I added, that Yoast didn’t use. There we have:

The campaign name: Default it is twitter, but you can give it a name like SEObeer because you want to promote the article about the next seo meeting in berlin.

Campaign Source: Well I think twitter is really the best word to use here.

Campaign Medium: Sure twitter is fair.

Campaign Term: That’s the title of the article we want to promote. So in analytics you can identfy wich articles you promoted.

Campaign Content: That’s your Tweat. Write anything you want to tell the world why they should click on the link that will follow. It will be send directly to twitter. So you don’t have to put in your text elsewhere.

And now, and now, and  now? Yeah! The best is yet to come:

Short URL: No you don’t have to shorten the URL by yourself. That will be done by the really great new short URL service redir.ec And what they offer you is to get a Wish-URL. So if you want to promote SEObeer, the short URL will be http://redir.ec/SEObeer

That’s cool uh? Yep, so let me think what else have I got? Oh forgot to thank Markus from adfire for developing the API of redir. And thank me for wainting to publish this after he finished the api. 😉

So and now here is the script:

First add this link to your bookmarks and edit it to match the location of the skript on your server.

javascript:(function()%7B%20window.open('http://www.example.com/seo-punk.skript.php?url='+encodeURIComponent(location.href)+'&utm&title='+encodeURIComponent(document.title));%20%7D)();

Than you have to download this fabulous script and upload it to your server. (Dont forget to rename it from .txt to .php)

That’s all. Go to your newest article, push the button and there you go! You see, promoting on twitter is so easy.

About the Author

Jan Kutschera ist Internet Idealist und Growthenthusiast so wie Zahlen und Analytics verrückt. Aufgeachsen mit L.A. Poser Metal, Punkrock und Grunge sind die Wurzeln seines Handelns irgendwo hier zu finden. Nach fast 10 Jahren und drei gegründeten Beratungs- und Marketing Agenturen ist sein Interesse mittlerweile die Strategie und der Aufbau von Geschäftsmodellen und eignen Produkten.

Comments are closed