Web Analytics Demystified

The T&T Plugin – Integrate T&T with Google Analytics

Published by Brian Hawkins on October 22, 2012.

« Back to all posts

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.

To push your campaign or test data over to SiteCatalyst, you create a HTML offer in T&T that looks like this:

<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:

T&T plugin, SiteCatalyst, Google Analytics

Then we simply configure the plug-in here:

T&T Plug-in Configurator

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:

Google Analytics Events

Now that we understand that, lets see what the integration gets you:

Google Analytics Test&Target


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 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):

Google Analytics Test Experiences

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.

About Brian Hawkins

Brian Hawkins has been in the Optimization and Personalization space for many years supporting dozens of clients both big and small across every industry vertical. Brian has worked in a variety of Strategic Consulting roles at Offermatica, Omniture, and Adobe creating integrated testing and optimization solutions that have successfully delivered tremendous additional value for his clients.

Want to speak with Brian? Contact Web Analytics Demystified

Brian Hawkin's Blog at Web Analytics Demystified

Posted Monday, October 22nd, 2012 | 4 responses


  • http://twitter.com/tgwilson Tim Wilson

    Great post! I wish other testing platforms had this level of flexibility built-in — having been doing some work with Optimizely, the GA integration is much easier/faster (one drop-down to select a custom variable slot to use)…but we also quickly ran into limitations when running multiple tests. In Optimizely’s case, the test data gets pushed into a visit-level custom variable, which, using the informatio here, would be easy to do with T&T, too.

    FWIW, I’d suggest using a non-interaction event in the T&T example in this post. It just requires the addition of “,,true” or “,1,true” to the trackEvent call. That way, you won’t inadvertently muck with bounce rate data for visitors who landed on the page where the test is running and then bounced.

    • bhawkins

      Thanks so much Tim. Really appreciate you sharing your experiences with Optimizely. I will be sure to update this post with examples on visit-level variables as I think that can certainly be helpful. Also, very interesting use of non-interaction events!

  • Yehoshua Coren

    I share Tim’s sentiment – very useful post. One thing to add would be to assign a visitor level custom variable to the event. This way conversions can be associated with a particular variation, even if the conversion happened during a different session where they didn’t see a page with the T&T variation. The custom variable key (name) can be Test&Target and the campaign name + recipe name concatenated for the value, or use campaign name for the CV key and recipe name for the value.

    • bhawkins

      Thank you Yehoshua. I really like your point on visitor custom variables. I will update the post to include your example, like Tim’s. Thanks again!

 
COPYRIGHT © 2011 WEB ANALYTICS DEMYSTIFIED, INC. ALL RIGHTS RESERVED. PRIVACY POLICY