I know I promised that my next post would dis­cuss using the SAINT API in con­nec­tion with cap­tur­ing Twit­ter data—and that arti­cle is com­ing soon—but since Adam Greco’s post two days ago, he and I have been for­tu­nate enough to dis­cuss with many of you how you’re plan­ning to cap­ture and use Twit­ter data. I wrote about one way to cap­ture this data here. The great thing about solu­tions like the one Adam and Omni­ture Con­sult­ing devised to pump Twit­ter data into Site­Cat­a­lyst is that they’re con­stantly evolv­ing and grow­ing to serve more and more client needs. In this short post, I’d like to dis­cuss briefly two addi­tional points to con­sider as you and your col­leagues help to develop your own strat­egy for merg­ing Twit­ter and web analytics.

Twit­ter cam­paign tracking

First, a com­mon prac­tice on Twit­ter is to try to drive cus­tomers (and poten­tial cus­tomers) to your site by link­ing to press releases, prod­uct info pages, user forums, and pages that may address spe­cific questions/concerns about your brand that are raised by users on Twit­ter. This is typ­i­cally done using a ser­vice such as tinyurl​.com or is​.gd to “shorten” the des­ti­na­tion URL; since tweets are lim­ited to 140 char­ac­ters, some URLs would be too long even if they were their own tweet, with­out any addi­tional explanation.

If you are doing this, or are think­ing about doing it, con­sider adding cam­paign track­ing codes to these des­ti­na­tion URLs before short­en­ing them using your pre­ferred ser­vice. While tying tweets to spe­cific vis­i­tors on your site is tricky, deter­min­ing which tweets by rep­re­sen­ta­tives from your orga­ni­za­tion directly led to con­ver­sion isn’t hard at all. Add a track­ing code to the des­ti­na­tion URL and let Site­Cat­a­lyst do the rest.

Twit­ter data in your pro­duc­tion report suite with­out inflation

Sec­ond, in my post yes­ter­day I sug­gested putting all of your Twit­ter (and other social media) data in a report suite sep­a­rate from the one that you use to track user inter­ac­tions with your web site. The rea­son for this is that tweets do not rep­re­sent page views, vis­its, or vis­i­tors to your site; mix­ing Twit­ter data with site data would lead to infla­tion in each of these met­rics. I am here today to tell you that there is actu­ally a fairly nifty way of get­ting Twit­ter data into the same report suite as your site data prac­ti­cally with­out inflation.

As men­tioned in Adam’s post as well as in my own, we rec­om­mend pump­ing Twit­ter data into Site­Cat­a­lyst using the Data Inser­tion API. Typ­i­cally, this involves pop­u­lat­ing the <visitorid> ele­ment with a vis­i­tor ID that your server assigns in any man­ner that works well for you. Pass­ing the vis­i­tor ID allows Site­Cat­a­lyst to orga­nize requests into vis­its. But you don’t want Twit­ter to inflate your visit count. So sim­ply leave out the <visitorid> ele­ment. Instead, pass the <ipaddress> and <userAgent> ele­ments; this causes a visit not to be counted for the given XML post.

One met­ric down; two to go. As you may already be aware, Site­Cat­a­lyst is able to track a user as a unique vis­i­tor based on a com­bi­na­tion of IP address and user-agent string when the vis­i­tor ID is not avail­able. Typ­i­cally this is a good fall­back method because most end users on your site at any one time have unique IP addresses and/or user-agent strings, so Site­Cat­a­lyst tracks them as dis­tinct vis­i­tors. But if, in your Data Inser­tion API imple­men­ta­tion, the IP address and user-agent string are always the same, then all of the posts will appear to have come from one vis­i­tor. The vis­i­tor data in your pro­duc­tion report suite will be inflated, but only by one (1) daily unique vis­i­tor, one monthly unique vis­i­tor, etc.

Finally, you will want to ensure that page views are not counted for each tweet. This is fairly straight­for­ward as well. You can cause any Data Inser­tion API post not to be counted as a page view by count­ing it as some­thing else—in this case, a “cus­tom link,” which passes data into Site­Cat­a­lyst but is not a page view. (I will cover cus­tom links in depth in a post in the near future.) This is done by adding two addi­tional ele­ments to your XML post:

<linkName>Twitter Mention</linkName>

The linkName ele­ment is used to give a friendly name to the action that is being reported in this post, and can be any­thing that you want. The link­Type ele­ment should have a value of “o” in this case, but can also be “d” to count a file down­load and “e” to count an exit link click.

Using this method, if you sent data for 10,000 tweets in a sin­gle day into your pro­duc­tion web site’s report suite in Site­Cat­a­lyst, you would end up with all of your Twit­ter data in eVars, zero extra page views, zero extra vis­its, and one extra daily unique visitor.

Rudi Shumpert
Rudi Shumpert

Great tips....now off to put this into my code.