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



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.
For eg :
 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



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.


  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.
function s_doPlugins(s) {
/* Add calls to plugins here */
[Insert Calls to Plug-ins Here]
/************************** 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 */

/*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({var"
+" ay=s.split(ev,',');var ea=s.split(,',');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()"
+"[q]=s.split(z,',')}}var e=new Date();e.setFullYear(e.getFullYear()+"
+"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."
+"]);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