The T&T Plugin – Integrate T&T with Google Analytics
When Test&Target was being built back in the day and doing business as Offermatica, it was designed to be an open platform so that its data can be made available to any analytics platform. While the integration with SiteCatalyst has since been productized, a very similar approach approach can be used to integrate your T&T test data with Google Analytics. Let me explain how here.
The integration of SiteCatalyst leverages a feature of Test&Target called a “Plug-in”. This plug-in concept allows you to specify code snippets that will be brought to the page upon certain conditions. The SiteCatalyst integration is simply a push of a code snippet or plug-in to the page that tells SiteCatalyst key T&T info.
Having something like this can be incredibly helpful for all sorts of reasons such as integrating your optimization program with third party tools, or by allowing you to deliver code to the page via T&T which saves you from having IT make changes to the page code on the site.
<script type=”text/javascript”>
if (typeof(s_tnt) == ‘undefined’) {
var s_tnt = ”;
}
s_tnt += ‘${campaign.id}:${campaign.recipe.id}:${campaign.recipe.trafficType},’;
</script>
This code is simply taking the T&T profile values in red, which represent your test name and test experience names, and passes them to a variable called s_tnt for SiteCatalyst to pick up. There is a back end classification process that takes place where these numerical values are translated into what you named them in T&T. This is helpful to shorten the call being made to SiteCatalyst but not required unless the call to your SiteCatalyst has a relatively high character count.
After you save this HTML offer in your T&T account, you then have to create the “Plug-in”. You can do so by accessing the configuration area as seen here:
Then we simply configure the plug-in here:
The area surrounded by a red box is where you select the previously created HTML offer with your plug-in code. You also have the option to specify when the code gets fired. Typically you want it to only fire when a visitor becomes a member of a test or when test content (T&T offers) are being displayed and to do so, simply select, Display mbox requests only. If you wanted to, you can have your code fire on all mbox requests as that can be need sometimes. Additionally, you can limit the code firings to a particular mbox or even by certain date periods.
Pretty straightforward. To do this for Google Analytics you use the code right below to create a HTML offer and configure the plug-in in the exact same manner. Note that we are not passing Campaign or Recipe (Experience) ID’s but rather profile tokens that represent the exact name of the Campaign name and Experience name specified in your test setup.
<script type=”text/javascript”>
_gaq.push([‘_trackEvent’, ‘Test&Target’,’${campaign.name}’,’${campaign.recipe.name}’]);
</script>
And that is it. Once that is in place, your T&T test data is being pushed to your Google Analytics account.
Before I show you what it looks like in Google Analytics, it is important to understand a key concept in Google Analytics.
Test&Target is using the Custom Events capability of Google Analytics to populate the data. Each Event has a Category, an Action, and a Label. In this integration, the Google Analytics Event Category is simply Test&Target because that is our categorization of these Events. The Google Analytics Action Event represents the Test&Target Test name. And finally, the Event Label in Google Analytics represents the Test&Target Test Experience. Here is a mapping to hopefully relate this easier:
Now that we understand that, lets see what the integration gets you:
What we have here is a report of a specific Google Analytics Event Category, in this case the Test&Target Event. Most of my clients have many Event Categories so it’s important to classify Test&Target as a separate Event and this plug-in code does that for you.
This is a very helpful report as we can get a macro view of the optimization efforts. This report allows you to look at how ALL of your tests impact success events being tracked in Google Analytics at the SAME time. Instead of looking at just a unique test as you might be used to when looking at test results in T&T, here we can see if Test A was more impactful then Test B – essentially comparing any and all tests against each other. This is great if organizations have many groups running tests or if you want to see what particular test types impact a particular metric or combination of metrics.
Typically though, one likes to drill into a specific test and that is available by changing the Primary Dimension to Event Label which, as you know, represents the T&T Test Experience. Here we are looking at Event Labels (Experiences) for a unique Event Action (Test):
Here we can look at how a unique test and its experiences impacted given success events captured in Google Analytics. Typically, most organizations include their key success events for analysis in T&T but this integration is helpful if you want to look at success events not included in your T&T account or if you want to see how your test experiences impacted engagement metrics like time on site, page views, etc….
So there you have it. A quick and easy way to integrate your T&T account with Google Analytics. While this can be incredibly helpful and FREE, it is important to also understand that statistical confidence is not communicated here in Google Analytics or any analytics platform that I know of, including SiteCatalyst. It is important to leverage your testing platform for these calculations or offline calculators of statistical confidence before making any key decisions based on test data.
While this was fun to walk you through how to leverage the T&T plug-in to push data into Google Analytics please know that you can use the plug-in for a wide array of things. I’ve helped clients leverage the plug-in capability to integrate T&T with MixPanel, CoreMetrics, and Webtrends. You can also use this plug-in capability to integrate with other toolsets other then analytics. For example, I have helped clients integrate T&T data into SFDC, ExactTarget, Responsys, Causata, internal CRM databases, Eloqua/Aprimo/Unica , Demdex (now DBA Audience Manager), and display retargeting toolsets. Any platform that can accept a javascript call or pick up a javascript variable can make use of this plug-in concept.
I’ve also helped customers over the years leverage the plug-in to publish tags to the site. Years before the abundance of Tag Management Platforms became available, there were T&T customers using the plug-in to publish Atlas, DoubleClick, and Analytic tags to the site. In fact, if Adobe wanted to, they could make this plug-in capability into a pretty nice Tag Management Platform and one that would work much more efficiently with T&T then the current Tag Management tool they have on the market today.