Leveraging the Power of the Loopfuse Custom Event Tracking API

Back in November 2011, Loopfuse introduced the ability to track custom events inside their Oneview marketing automation solution. However, unless you are software developer, understanding the power of this hidden gem of a feature is hard to grasp. The basic idea with Loopfuse custom event tracking is that you can track and store any type of visitor data inside a custom event. This feature allows you to go beyond the basics of tracking email and website activity found in most marketing automation tools.

Typical use cases for event tracking would involve ecommerce cart abandonment or online assessments. For example, if you have an interactive quiz on your website you could store the values or score from that quiz inside a custom event and attach that data to your leads inside Loopfuse. You could also use custom events if you wanted to track abandonment of a multi-step process. For example, let's say you wanted to see where leads are abandoning your sales funnel; you could instrument each stage of your sales funnel to record a custom event that would mark a lead's progress through the funnel. It is also important to note that this type of functionality is usually only found in enterprise-class marketing automation systems that cost thousands more than Loopfuse.

From a technical perspective, instrumenting your web pages to record custom events in Loopfuse is fairly straightforward. It requires inserting a few snippets of custom JavaScript code in the pages you want to instrument with custom event tracking. The first step is to get the Loopfuse Visitor ID (vid) from the Loofuse Cookie.

Example of a typical JavaScript function call to get the Loopfuse VID from the cookie:

function getCookie(cookie_name){

var c_value = document.cookie;

var c_start = c_value.indexOf(" " + cookie_name + "=");

if (c_start == -1)

{

c_start = c_value.indexOf(cookie_name + "=");

}

if (c_start == -1)

{

c_value = null;

}

else

{

c_start = c_value.indexOf("=", c_start) + 1;

var c_end = c_value.indexOf(";", c_start);

if (c_end == -1)

{

c_end = c_value.length;

}

c_value = unescape(c_value.substring(c_start,c_end));

}

return c_value;

}

Once you have the visitor ID from the cookie and have validated that it's not empty, you can then make the call to the Loopfuse API using a snippet of JavaScript like this:

//Get the Loopfuse visitor ID (vid) using the above get cookie function

lf_vid = getCookie('LOOPFUSE');

//Make sure the cookie is not empty

cookie_length = lf_vid.length;

if (cookie_length > 2){

//Important note: You would dynamically replace the following values in the URL string:

//Once you've assembled your GET request you send it over to Loopfuse via their REST API like this

var xmlhttp;

xmlhttp=new XMLHttpRequest();

xmlhttp.open("GET",get_url1,true);

xmlhttp.send();

}

As you can see, utilizing the Loopfuse API is fairly easy and provides a fairly simple way for you to begin tracking custom events on your website. Now it's up to you decide how you want to leverage this powerful tracking tool. What events merit tracking on your website? Where is engagement dropping off? With the Loopfuse Event tracking API you can begin to answer these important questions.