Track the Number of Your Twitter Followers in SiteCatalyst

I am a huge fan of the Twitter Analytics plug-in from OmnitureTwitterAnalytics.com.
In case you don’t know, the plug-in is a fully configurable feature designed to track brand popularity by capturing comments from Twitter into Omniture SiteCatalyst in real time. It is based on the Twitter Integration concept that was introduced by Adam Greco at Omniture Summit 2009.

I have been using it for many months now, recently upgrading to the latest version, but I still wanted more. Using the plug-in I know how many people are discussing my brand, but how many people are following my brands Twitter profile? How good are we doing at attracting followers and keeping them? I know I can just go right to twitter and see how many followers I have there, but that’s no fun. I want all my data right in SiteCatalyst! How many followers did I have yesterday, or last week? How did that tweet we put out there at 3pm do in attracting new followers? Did we lose any because of it?

One of the sites I work with is ForRent.com. They have a twitter profile, @AptsForRent, and they have been working on building a following. I decided to use them to test out to see if I could automatically record the number of followers they have each hour, every hour, and trend it over time.

Based on the code from OmnitureTwitterAnalytics.com I decided to see what I could do to use the Twitter API to look and see how many followers we have, and the Omniture Data Insertion API to insert that number into SiteCatalyst once an hour. I choose to do it only once an hour, since the smallest time granularity we can get in SiteCatalyst is hourly.

Download the Twitter Follower Tracking Code

First thing you need to do is to set up a new event. Make sure it’s set up as a numeric event, not a counter. Then take the php code and fill in the following variables:
$namespace = “YOUR_NAMESPACE_GOES_HERE”; //Namespace of your Omniture account
$domain = “112.2o7.net”; //This should not change UNLESS you are using first party cookies
$rsid = “REPORT_SUITE_IN_SITECATALYST”; //Name of the Report Suite we are sending data to
$tweetUser = “TWITTER_NAME”; //Twitter user name to track
$successEvent = “EVENT_NUMBER”; //Event you are going to use

Now set up a cron to run the code once an hour. If you set it more than once an hour it will take your follower count and sum it together for that hour. If you do it less than once an hour, then you will be missing data. So remember, once an hour.

OK so what do we get? Pull up the report for the event you chose to use. Be sure to look at it at a hourly granularity. If you look at daily totals, then you are going to see the grand total number of your followers each hour summed up. So if you have 100 followers, never gain any or lose any for an entire day, looking at that report on a daily granularity will say 2400. So remember, view the report hourly.
Twitter Follower Report
By viewing the report you can see how many followers you had each hour. You can go back in time and see how many followers you had at 4pm on Thursday and how may you had at 1am on Sunday. Now you know if that “joke tweet” you did at 2pm cost yourself 8 followers, or gained you 6.

Enjoy!

Leave a Reply