Thursday 21 September 2017

The T&T Plugin

plugin2

The Test&Target plug-in was introduced back in 2008. It was clear that even before then these mboxes can not only can be used for the presentation of test content or setting profiles but they also offer a window into the website for developers. This window allows developers to get code to the page without having to bother IT or add any additional code to the page.

A Test&Target plug-in is a way to append javascript or HTML to an mbox response without disrupting the T&T campaign content being delivered.. When mboxes make calls to the T&T global edge network, the servers evaluate if that visitor is to be a member of test and then responds accordingly. The plug-in can be included as part of the response.

These plug-ins can be comprised of any snippet of code and you can control them entirely in Test&Target. There are many ways to use the plug-in but let me walk you through a scenario that our SiteCatalyst customers are seeing a lot of value with.  We are going to walk through passing T&T profile data into SiteCatalyst.

I’ve posted previously about how the T&T profile can be used for Display Retargeting here and how the T&T profile can be augmented with Alliant data here. These profiles and their attributes are quite powerful in T&T as you can imagine, but we have learned that they are just as powerful, if not more powerful, to have them available outside of T&T. The Test&Target platform is an open system in that you can import data as well as export data. The T&T plug-in is a great way to get this profile data into other systems including SiteCatalyst  By having these values assigned to e.Vars and s.Props, you can use them to create custom reports, unique to your organization, industry, and business objectives.

For those SiteCatalyst and Test&Target users out there, here is the approach that will allow you to dynamically have Test&Target profiles values sent to SiteCatalyst via a T&T plug-in.

  1. Identify what profile values you would like to see in your SiteCatalyst data. For this example, I have chosen to use some Alliant profile variables and a profile variable I use to put visitors into test buckets.  Make sure you have these profiles running and that will make the profiles available as tokens for use in the plug-in.  If you check out the footer of this page or my post on Alliant Data you can see that I make extensive use of profiles by presenting values dynamically onto the page using these tokens.   There is more information on how to setup profiles and what tokens are here.
  2.  

  3. Create a T&T html offer that will represent your plug-in.  You can see that this is standard javascript that is often used by implementers of SiteCatalyst.  Here is my offer code: 

    <script type=”text/javascript”>
    vars = new Object();

    vars.prop1=”${user.alliant_age}”;
    vars.prop2=”${user.alliant_medianIncome}”;
    vars.prop4=”${user.assignedGroup}”;

    vars.eVar8=”${user.assignedGroup}”;
    vars.eVar9=”${user.alliant_age}”;
    vars.eVar10=”${user.alliant_medianIncome}”;

    s.t(vars);
    </script>

    In this example, my Plug-in is called “Pass Profiles to SiteCatalyst Plug-in” and I have elected to use three s.Props and three e.Vars to collect this profile data in SiteCatalyst.  The profile data assigned to the SiteCatalyst variables are represented as tokens here but will change dynamically when this code executes client side. Here is what it looks like in Test&Target:

  4. Assign your html offer as a plug-in. The plug-in section is accessible by hovering over the configuration tab in your Test&Target account. Here is a look at my plug-in:
    In this plug-in configuration section we have many options available to us including, the scheduling of the plug-in, limiting it’s execution to a particular mbox or an mbox used to display test content, having it execute based on the campaign or test state (approved vs. all including unapproved campaigns) and whether or not to have it execute in production host groups.  For this example the plug-in will execute when someone sees the mbox “alliant_testandtargeting_demo”.  This mbox is only located on the blog post on using Alliant data which means that the passing of these profiles into SiteCatalyst will only happen when visitors view that post.

    An important thing to note is that these plug-ins execute independently of campaigns and offers so you don’t have to worry about these snippets of code interfering with your campaign offers.

After following these steps, I can see this working in WASP and I can see the data in SiteCatalyst.  Here is a snapshot of my variables being dynamically assigned to the page:

And of course in SiteCatalyst where I am looking at the Alliant Median Age profile values here:

This is just a very generic use of the plug-in but certainly one that can add a lot of value. There are many ways to leverage the plug-in and the sky is truly the limit. Some of our clients use the plug-in to communicate to their email systems or their internal marketing databases while some other clients use it to deploy and take down third party tags to the page. Some of our Insight customers use the plug-in to deploy T&T data directly into Insight and here is an example of that:

<script type=”text/javascript”>

mboxCurrentName=mboxCurrent.getName()
var tu = “http://www.your-site.com/___waseq.img?Log=1″ +
“&tntPage=” + escape(document.location.href) +
“&tntTitle=” + escape(document.title) +
“&tntReferrer=” + escape(document.referrer) +
“&tntCampaignID=${campaign.id}” +
“&tntCampaignName=” + escape(‘${campaign.name}’) +
“&tntRecipeID=${campaign.recipe.id}” +
“&tntRecipeName=” + escape(‘${campaign.recipe.name}’) +
“&tntTrafficType=${campaign.recipe.trafficType}” +
“&tntOfferID=${offer.id}” +
“&tntMbox=” + escape(mboxCurrentName) +
“&tntPCID=${user.pcId}” +
“&tntSessionID=${user.sessionId}” +
“&tntFirstSession=${user.isFirstSession}” +
“&tntPageID=” + mboxFactoryDefault.getPageId() +
“&tntTime=” + new Date().getTime();
var ti = new Image();
ti.src = tu;

</script>

and finally if you wanted to see a quick video on this set up in Test&Target you can check that out here:

One Comment

  1. Ben says:

    Great stuff – this is a very helpful post. Thanks!

    Reply

Leave a Comment