Wednesday, June 20, 2012

Cross Visit Participation plugin


Why cross visit participation?


Conversion Variables (eVars) have different types of allocation.  For example, if someone comes to your site multiple times from a few different campaign tracking codes, you can choose to give credit for any Success Event to the first tracking code or the last tracking code using allocation
The same is true for every eVar, but there may be times when you want to see all of the values passed to an eVar prior to the Success Event taking place. This can be achieved with help of cross visit participation plugin .
Cross Visit participation  is a JavaScript plug-in that concatenates a series of values into an eVar for attribution purposes.
The most common use of this plug-in is for what we call Campaign Stacking




PLUG-IN INFORMATION

Description

A value is passed in and appended to a list of previous values, and that list of values is returned.
The values are separated by a configurable separator and each value will expire after a configurable duration.
 The list of values will expire when one or more events (as defined by the client) occur.
 Whether values are de-duplicated(meaning the same value is set twice in a row) is configurable.
SYNTAX:
s.crossVisitParticipation(v,'cn',‘ex',‘ct',‘dl',‘ev',dv);
For eg :
s.crossVisitParticipation(s.campaign,'s_ev36','30','5','>','',0);
PARAMETERS:
 v = value to stack
 cn = name of the cookie storing the list of values
ex = expiration (in days) of each value in the list
 ct = number of distinct values to store in the list
 dl = value delimiter
 ev = (optional) Comma seperated list of success events that will clear the list
 dv = (optional) whether consecutive duplicate values will be stored (0=no,1=yes)
 RETURNS:IF "v" was not empty AND an event clearing the list was NOT set the list will be returned ELSE an empty string is returned.
REQUIRES: split, join plugin



TECHNICAL SOLUTION

 

Need to classify Campaign Tracking Codes by Marketing Channel and use Cross-Visit Participation to “stack” Marketing Channels (i.e. Paid Search, Display Ad, E-mail, etc…).  The classification of Campaign Tracking Codes by Marketing Channel should be straightforward with SAINT Classification. 

The second item needed is a concatenated string of “stacked” Marketing Channels so you can see the interplay between them prior to website conversion.  There are many ways to “stack” the channels ranging from creating SAINT classification of stacked campaign tracking codes to capturing the channel by using the Get Query parameter plugin .
      Once you have both of these set-up, you are ready for analysis.

DEPLOYMENT STEPS


  1.Include the plug-in function(s) in the ***Plug-ins*** section of the Omniture JavaScript file for  Report suite .Call the plug-in from within the doPlugins section of the JS file as shown below.Please find attached crossvisitparticipation plugin below.
s.usePlugins=true
function s_doPlugins(s) {
/* Add calls to plugins here */
[Insert Calls to Plug-ins Here]
}
s.doPlugins=s_doPlugins
/************************** PLUGINS SECTION *************************/
/* You may insert any plugins you wish to use here. */
[Insert Plug-in Code Here]
…..Rest of the JS File


2. Next in the s_doPlugins section of the s_code file you need a couple lines of setup
/* Campaign Stacking (CVP): 30 day exp, 5 value max, no dupes */
     s.eVar36=s.crossVisitParticipation(s.campaign,'s_ev36','30','5','>','',0);

/*Plug-in: crossVisitParticipation v1.7 - stacks values from
specified variable in cookie and returns value
 */
s.crossVisitParticipation=new Function("v","cn","ex","ct","dl","ev","dv",""
+"var s=this,ce;if(typeof(dv)==='undefined')dv=0;if(s.events&&ev){var"
+" ay=s.split(ev,',');var ea=s.split(s.events,',');for(var u=0;u<ay.l"
+"ength;u++){for(var x=0;x<ea.length;x++){if(ay[u]==ea[x]){ce=1;}}}}i"
+"f(!v||v==''){if(ce){s.c_w(cn,'');return'';}else return'';}v=escape("
+"v);var arry=new Array(),a=new Array(),c=s.c_r(cn),g=0,h=new Array()"
+";if(c&&c!=''){arry=s.split(c,'],[');for(q=0;q<arry.length;q++){z=ar"
+"ry[q];z=s.repl(z,'[','');z=s.repl(z,']','');z=s.repl(z,\"'\",'');arry"
+"[q]=s.split(z,',')}}var e=new Date();e.setFullYear(e.getFullYear()+"
+"5);if(dv==0&&arry.length>0&&arry[arry.length-1][0]==v)arry[arry.len"
+"gth-1]=[v,new Date().getTime()];else arry[arry.length]=[v,new Date("
+").getTime()];var start=arry.length-ct<0?0:arry.length-ct;var td=new"
+" Date();for(var x=start;x<arry.length;x++){var diff=Math.round((td."
+"getTime()-arry[x][1])/86400000);if(diff<ex){h[g]=unescape(arry[x][0"
+"]);a[g]=[arry[x][0],arry[x][1]];g++;}}var data=s.join(a,{delim:',',"
+"front:'[',back:']',wrap:\"'\"});s.c_w(cn,data,e);var r=s.join(h,{deli"
+"m:dl});if(ce)s.c_w(cn,'');return r;");






 

No comments:

Post a Comment