The last time that I seriously tried sharing my blog posts by Twitter, it seemed like I was sending my posts out into an unforgiving blackhole. I used BufferApp, which contains analytics for tracking how many people click on your link, but it was discouraging… to say the least. I’d see a click… but then what? Did they immediately regret clicking? Did they look at other posts? I would check my Google Analytics, but the click wouldn’t be there!
Only a portion of Twitter traffic happens on the web. Twitter, Facebook, and other social platforms have so many new ways to access them — whether from a desktop program like Tweetdeck or a mobile app.
Google Analytics (and most every analytics program currently existing) can’t figure out where that link is coming from. For all that it can tell, that visitor typed in that URL by memory. It looks like Direct Traffic, so it reports it as that.
Adding an extra campaign tracking parameters to the URLs that you tweet will fix that. The parameters tells Google Analytics explicitly that the visitor came from Twitter, or whatever you set. Once I implemented this and started tweeting my posts again, I started seeing that people did actually read my tweets, and wow, clicked on them to visit my blog.
And when promoting a book (and using a landing page to do it), campaign tracking will provide you with golden information on where to focus your efforts. Which social network results in more visits? Which social network clicks through the store most often? (Which is a topic for another day.)
How to create campaign tracking parameters
Without needing to do any coding at all, you can either manually add the campaign parameters to the end of your URL or use a generator to automatically create the URL.
Your link will end up looking like this:
http://tsukiyomi.ca?utm_source=Twitter&utm_medium=SocialMedia&utm_campaign=Buffer
Medium refers to the category. In this case, it’s Social Media. Other types include Direct Traffic, Organic, and Referral. Medium is meant to be broad as the first layer, the 2,000 foot view.
Source is the subcategory, the one that provides more detail. For Organic Search, it would be the search engine. For Referral, it would be the URL. In this case, it would be the social network — Twitter, Google+, or Facebook. Source is the second layer, comparing the different sources of a medium to answer questions like — does Twitter bring more traffic than Google+?
Campaign drills down even further. In this example, I set it to Buffer since I want to know that this click resulted from somebody seeing my tweet (or a retweet of that tweet) that I sent via Buffer. For tweet buttons, you would use “TweetButton”. If you do a contest on your blog, you may want to use the contest name as the campaign.
How to add campaign tracking to your social buttons
Being able to add campaign parameters to your own tweets is useful, but time-consuming. Everytime you want to send out a tweet, you have to add the parameters. And what about the Tweet Button? Visitors won’t know to add the proper tracking parameters for you.
Adding campaign tracking to your social buttons requires a bit of coding, but it’s easy when you have buttons like ShareThis. The most lovely things about ShareThis buttons (beside their appearance) is that a) they’re not generated as iframes and b) you can manipulate the code in the widget or add the buttons manually to your website. Both of these things, while not particularly lovely in themselves, allow you to easily add campaign parameters to your buttons.
- First, add the ShareThis plugins. You will have to create a ShareThis account.
- Next, go into the ShareThis plug-in. In WordPress.org, this is under Settings.
- Pick which buttons you want and which order you want them in.
- Expand the “Click to view/modify HTML tags” underneath the button order textbox. That’s the code you need to modify.
- Add the tracking parameter (?utm_source=Twitter&utm_medium=SocialMedia&utm_campaign=TweetButton) to your button like this:<span class=’st_twitter_hcount’ st_title=’<?php the_title(); ?>’ st_url=’<?php the_permalink(); ?>?utm_source=Twitter&utm_medium=SocialMedia&utm_campaign=TweetButton‘ displayText=’share’></span>
The PHP tag is what tells it grab the URL (your permalink) for the tweet butotn. You need to place your tracking parameter outside the > but before the ‘. It’s the same for every button. Stick the campaign parameter behind the php tag for the URL (but change the campaign and source for each one as appropriate). You can tell which button it is by looking at what social network is in the class=”" for that span tag.
- Select “Yes” for “Automatically add ShareThis to your posts?” and then click “Update ShareThis Options.”
Buttons with your campaign tracking URLs will appear underneath all your posts, single posts and on the index page. If you want buttons in different places like I have, you will have to manually place the buttons, which would be a whole post in of itself.
Once you have it in place, you can use the URLs automatically shortened by the buttons by copy and pasting into the URL bar, quickly edit the campaign information, and then use your new URL in your tweets. (One drawback is that if you shorten your links with Bit.ly or another shortener, they won’t count as a tweet by ShareThis). Or, to save time (but messing up your campaign tracking), simply tweet from the button.
Like I said, easy, and it will add a whole lot of clarity to your pages. But remember, it’s not fail-proof. Because the campaign tracker overrides the medium and source that Google Analytics thinks it is, if someone finds your post by Twitter and then uses that link to share it on Facebook, any resulting clicks will appear as coming from Twitter. Still, it will make your direct traffic and social media traffic a lot cleaner.
If you have any questions, feel free to ask away! And if you do implement this, share away.


Leave a comment
Comments feed for this article