Capturing Response Data
In my last post on this topic, I showed how to capture the respondent's "Survey ID" in the web analytics solution. That’s as far as some integrations go but it’s hardly satisfactory. In this post, I’ll show how to capture key response data and integrate it into the the web analytics tool. In this short series, I’m focusing on QuestionPro – a very inexpensive survey solution as an example case and showing how it can be effectively tied into Omniture.
There's really no good reason to stop with integrating only a respondents Survey ID into Omniture - it's the most bare-bones and least useful level of integration. It’s easier AND more useful to integrate actual response data directly into the web analytics solution in real time using the tag. QuestionPro lets you do this, but there are few caveats. First, with the free version you can’t do it very well and you can't do it the way I'm going to show you here. With the almost free version, you have five custom variables you can use. Everything I'll show in this post can be done with the "almost" free version. With the very inexpensive enterprise version you have pretty much all the custom variables you might ever need and you can do the really fancy stuff I'll show in the next two posts.
Custom variables in QuestionPro aren’t the most flexible constructs in the world (and you’re probably better off with my documentation here than what you’ll get on the site), but they can do the job.
Here’s a screenshot of some sample code that sets a couple of custom variables based on the answers to a couple of questions:
The logic here is pretty simple. Each "if" statement tests the value of single question. Each question in QuestionPro is identified by a string that is usually something like "Q1" or "Q13." For questions that have multi-parts, you can access each part by adding an _X to the QuestionName. So Q1_1 is the first response to Question 1 and Q1_3 is the 3rd response (this often comes into play when you are grouping multiple ratings questions under a single heading).
The value of the Question is simply the ordinal number of the response. So if ${Q1} is equal to 1, it means the respondent picked the first option. A value of 3 would be third option, etc.
You have to assign string values to the custom variables and the statement:
$survey.updateCustom2("boredom")
sets the QuestionPro Custom2 variable to the assigned string - in this case "boredom."
It would save a lot of time if you could simply assign the response value of Q1 to the Custom2 variable - but it doesn't seem to work that way. The assignments have to be strings. That means you're code gets pretty bulky but it's very easy to write.
One peculiarity with QuestionPro (and there are few when it comes to the scripting) is that the script needs be placed after a page break and can’t be placed on the Thank You page. This can be a hassle if you prefer a single page survey and want to integrate Omniture.
Now that you’ve captured the custom variables, putting them Omniture is a cinch. On the Thank You Page, you just set some s.props or s.eVars with the responses. Here’s a sample of the code:
At this point, with probably no more than 1-2 hours of work, you’ve got your survey-data, including actual responses, integrated real-time with Omniture.
There are a couple of issues. We’ve stored each question in a single Omniture variable. This is completely appropriate if you want to integrate only a few of the most important questions into the behavioral stream or if you are running a short survey. But if you want to store say 25-50 questions in Omniture, you’ll probably find you don’t have enough variables to do the job.
Sure, SiteCatalyst comes with 50 props and eVars, but unless you’re implementation is pretty slender, there’s a good chance you don’t have all of them available for survey responses.
Still, many, many sites are happy integrating only the top 4-5 questions with the behavioral stream.
And if that’s good enough, you’re done.
In my next post, I'll take this yet one level further and show how to capture your entire survey response set in Omniture!
Gary, so sad that we can only integrate Survey ID from iPerception into Omniture at this point, due to the limit of variables available. But one variable is better than nothing. When we are able to demonstrate the value of VOC intragation with Omniture, we can then convince execs to invest more.
See you in San Jose!
Ed
Posted by: Ed | April 22, 2009 at 07:38 AM