Archives

 

Additional Methods To Measure Interaction Using The Get Time To Complete Plug-In

Recently there was a great article on the Omniture Blog all about Capturing Time Spent on . . . well, just about anything. It’s a great post and definitely worth checking out. After reading it I was wondering if there was another way to do it? Of course there is! I present the Time To Complete Plug-in.

The getTimeToComplete plug-in will track the time it takes a user to complete some process on your site. The “clock” begins when you call the plug-in with the value “start” and stops when the plug-in with the value “stop”. The plug-in can be used to track the time to complete a checkout process, to track the time to complete an application process, to track the time a user spends viewing/using Rich Internet Applications (RIA), or to track the time between a download and a purchase.

s.getTimeToComplete( v, cn, e )

v is the Value – ‘start’ or ‘stop’
cn is the Cookie Name – example: ‘ttc’
e is the Expiration – days to expiration of the cookie, 0 for session
This function will return an empty string ” or a value in days, hours, minutes or seconds

There is a bunch of different ways to use this plug-in. I like this first method because you do not have to add a single of code to the page to make it work (I have found it is much easier to get a development team to simply upload a new s_code file as opposed to adding additional code to the site.) Lets say you want to track a form on your site. Lets say the form is at /my-form.php. Once the visitor fills out the form, they are taken to the thank you page which lets say is at /my-form-thanks.php. I would add this bit of code to the s_code file:

if (window.location.pathname=='/my-form.php') s.ttc='start';
if (window.location.pathname=='/my-form-thanks.php') s.ttc='stop';
s.prop1=s.getTimeToComplete(s.ttc,'ttc',0);

What this does is looks for the path in the URL for /my-form.php and sets start in s.ttc. When the plug-in see’s this it set’s the cookie ttc with a start time Then when the URL path is /my-form-thanks.php stop is set. When the plug-in see’s stop, it then reads the ttc plug-in and records the time difference in s.prop1. The time value that you will get will have days and hours rounded to .2 (e.g. 1.4 days), minutes to .5 (e.g. 2.5 minutes), and seconds to 5 (e.g. 15 seconds).

NOTE:When this is implemented, if you check the debugger you will not see any value for s.prop1 until you have reached the stop point of the process.

Here is another way to use the code. Let’s say you have some events set right on the pages of your site. We want to know how long it takes to get from when event1 is set to when event2 is set. I would add this code into the s_code file:

if(s.events.indexOf('event1')>-1) s.ttc='start';
if(s.events.indexOf('event2')>-1) s.ttc='stop';
s.prop1=s.getTimeToComplete(s.ttc,'ttc',0);

What this does is look for when event1 happens, then set start in s.ttc. When event2 happens stop is set, and the time value is set in s.prop1.

NOTE: Another thing to remember is this can be used to record the time of many different processes or paths on your site. If you do that I suggest using a different cookie name and variable value in each one so there are no issues.

Here is the actual plug-in code:
The getTimeToComplete plug-in returns the time to complete a task. When v is ‘start’ a cookie is written with the timestamp. When v is ‘stop’ the cookie is read and the expired time is returned in days, hours, minutes, or seconds.

/*
 * Plugin: getTimeToComplete
 */
s.getTimeToComplete=new Function("v","cn","e",""
+"var s=this,d=new Date,x=d,k;if(!s.ttcr){e=e?e:0;if(v=='start'||v=='"
+"stop')s.ttcr=1;x.setTime(x.getTime()+e*86400000);if(v=='start'){s.c"
+"_w(cn,d.getTime(),e?x:0);return '';}if(v=='stop'){k=s.c_r(cn);if(!s"
+".c_w(cn,'',d)||!k)return '';v=(d.getTime()-k)/1000;var td=86400,th="
+"3600,tm=60,r=5,u,un;if(v>td){u=td;un='days';}else if(v>th){u=th;un="
+"'hours';}else if(v>tm){r=2;u=tm;un='minutes';}else{r=.2;u=1;un='sec"
+"onds';}v=v*r/u;return (Math.round(v)/r)+' '+un;}}return '';");

I really like this plug-in because you end up with a report that is completely dedicated to the time it takes to complete that exact action.

Enjoy!

Increase SiteCatalyst Clickmap Functionality with Dynamic Object IDs Plug-in

ClickMap. Pretty useful tool. It gives you a neat overlay that shows you what links are clicked on a page and the associated traffic. I wonder how we can make it better? Knock knock. Oh who is that at the door? Why its the Dynamic Object IDs Plugin. Please step right in.

The Dynamic Object IDs Plug-in dynamically adds an object ID to the click thru URL. You can see it using the debugger. It is designed to improve the function of the Clickmap.

Let’s take a look at an example. From the home page of this site, there are 3 links that take you to the Contact page. I click the last one on the page, then open the debugger on the page I land on. Here you can see that the click thru URL has been appended with the number of the order that it happened to appear in on the page. So now when I have multiple links on a single page each one is easily spotted in the debugger, even though they all have the same anchor text and click thru URL.
Dynamic Object ID Plug-in

Now what do we get? If you look at the clickmap report, Site Content>Links>ClickMap, you will now see a number attached to each URL.
Clickmap Report
Now you know exactly which link was clicked.

Here is how I have it implemented on this site. Before the function s_doPlugins(s) I include the code:

/* DynamicObjectIDs config */
function s_getObjectID(o) {
	var ID=o.href;
	return ID;
}
s.getObjectID=s_getObjectID

Then within the s_doPlugins(s) function, I include:

/* To setup Dynamic Object IDs */
s.setupDynamicObjectIDs();

And finally in the Plug-ins section I have the plug-in code itself.

/*
 * DynamicObjectIDs
 */
s.setupDynamicObjectIDs=new Function(""
+"var s=this;if(!s.doi){s.doi=1;if(s.apv>3&&(!s.isie||!s.ismac||s.apv"
+">=5)){if(s.wd.attachEvent)s.wd.attachEvent('onload',s.setOIDs);else"
+" if(s.wd.addEventListener)s.wd.addEventListener('load',s.setOIDs,fa"
+"lse);else{s.doiol=s.wd.onload;s.wd.onload=s.setOIDs}}s.wd.s_semapho"
+"re=1}");
s.setOIDs=new Function("e",""
+"var s=s_c_il["+s._in+"],b=s.eh(s.wd,'onload'),o='onclick',x,l,u,c,i"
+",a=new Array;if(s.doiol){if(b)s[b]=s.wd[b];s.doiol(e)}if(s.d.links)"
+"{for(i=0;i<s.d.links.length;i++){l=s.d.links[i];c=l[o]?''+l[o]:'';b"
+"=s.eh(l,o);z=l[b]?''+l[b]:'';u=s.getObjectID(l);if(u&&c.indexOf('s_"
+"objectID')<0&&z.indexOf('s_objectID')<0){u=s.repl(u,'\"','');u=s.re"
+"pl(u,'\\n','').substring(0,97);l.s_oc=l[o];a[u]=a[u]?a[u]+1:1;x='';"
+"if(c.indexOf('.t(')>=0||c.indexOf('.tl(')>=0||c.indexOf('s_gs(')>=0"
+")x='var x=\".tl(\";';x+='s_objectID=\"'+u+'_'+a[u]+'\";return this."
+"s_oc?this.s_oc(e):true';if(s.isns&&s.apv>=5)l.setAttribute(o,x);l[o"
+"]=new Function('e',x)}}}s.wd.s_semaphore=0;return true");

To see this code in the s_code file running this site, you can check it out here.

Ok great. Now what else can we do with this plug-in? Lets say I want to track how many contact form submissions I received from clicking the third Contact link that appears on the Home Page? Well I could add a custom onclick function. I could add a tracking code on the end of the click thru URL. But how can I use this new plug-in to track this?

Recently there was a post on the Omniture blog about using Dynamic Variables. Using these variables we can now grab the value of oid, which is the click thru URL with the new object id added to it, and you can get the pid which is the page the click happened on. I have it set up on this site:

s.prop20=s.eVar20="D=oid";
s.prop22=s.eVar22="D=pid";

Now with a simple subrelation I can get what link was clicked on what page and what events occurred, all without adding any additional code to the page.

Enjoy!

The getCartOpen and resetGetCartOpen SiteCatalyst Plugins

In our quest to make our SiteCatalyst implementation more powerful and lighten the load on the developers and programmers (who for some reason always have more important things to do then add more Omniture code to the site), there are a couple of plug-ins I like to use to help to set the scOpen event.

The scOpen event is used to populate the Carts Report and metric with the number of times visitors view a new shopping cart during an eCommerce process. The scAdd event should be used when adding items into a shopping cart. But what if every time you add an item to the shopping cart, you are taken to the shopping cart? Well then you should set both events the first time. But only first time the shopping cart is opened, the scOpen event should be set. If the shopping cart has already been opened, the scOpen event should not be set again during that visit. So how do we make sure that the scOpen event is only set on that very first instance of the cart being viewed?

What we have here are the getCartOpen and resetGetCartOpen SiteCatalyst plug-ins. What the getCartOpen plug-in does is looks for the very first instance of the scAdd event being set and adds the scOpen event at that same time. Each time after that the scAdd event is set, the scOpen event will not be set again. But what if the visitor completes an order and wants to place another during the same visit? That’s where the resetGetCartOpen plug-in comes in. It looks for an instance of the purchase event and then allows the scOpen event to be set again if a new shopping cart is created.

This first line which goes in the calls to plugins section of the s_code.js file, calls the getCartOpen plugin and returns the events string with scOpen added the first time scAdd occurs during a visit.

/*Get Cart Open*/
s.events=s.getCartOpen("s_scOpen");

And here is the getCartOpen plug-in code that should be added to the plug-in code section.

/*
 * Plugin: getCartOpen
 */
s.getCartOpen=new Function("c",""
+"var s=this,t=new Date,e=s.events?s.events:'',i=0;t.setTime(t.getTim"
+"e()+1800000);if(s.c_r(c)||e.indexOf('scOpen')>-1){if(!s.c_w(c,1,t))"
+"{s.c_w(c,1,0)}}else{if(e.indexOf('scAdd')>-1){if(s.c_w(c,1,t)){i=1}"
+"else if(s.c_w(c,1,0)){i=1}}}if(i){e=e+',scOpen'}return e");

This line which goes in the calls to plug-ins section of the s_code.js file, calls the resetGetCartOpen plug-in and resets the scOpen event after a purchase takes place, allowing the scOpen event to be set again if the visitor decides to make another purchase during the same visit.

/*Reset Get Cart Open*/
s.events=s.resetGetCartOpen(); 

And here is the resetGetCartOpen plug-in code that should be added to the plug-in code section.

/*
 * Plugin: resetGetCartOpen
 */
s.resetGetCartOpen=new Function("" 
+"var s=this,t=new Date,e=s.events?s.events:'';t.setTime(t.getTime()+"
+"10000);if(e.indexOf('purchase')>-1){if(s.c_r('s_scOpen')||e.indexOf"
+"('scOpen')>-1){if(!s.c_w('s_scOpen','',t)){s.c_w('s_scOpen','',0);}"
+"}}return e");

For more information on when to use the scOpen and scAdd events, check out the Omniture Knowledge base Answer ID 440.

Enjoy!

Detect Silverlight and Flash with SiteCatalyst Plugin

Tracking your visitor’s Flash version is nothing new. I wrote about it a while ago in the Plugin To Detect Flash in SiteCatalyst post. What I have here is a little more powerful. This is the Rich Internet Application tracking plug-in.

RIA development is becoming more and more popular. Do your Visitors have Flash? What version? How about SilverLight? What version of that? Do they have both? Now you will know. What this SiteCatalyst plug-in does is detects the Silverlight version, and the Flash version. If you want to see it in action, fire up your Omniture JavaScript debugger on this page. You will see s.prop10 and s.prop11 (c10 and c11) populated with the Flash version and Silverlight versions your browser has installed. You will also see the Flash version populated in s.prop9 (c9). This is done using the original flash detection plug-in mentioned above.

Here is how to use it. First in the s_code.js file call the plug-in along with the variables you want to use to store the visitors rich application versions. Here I am using s.prop10 and s.prop11:

s.detectRIA('s_ria','prop10','prop11'); 

Then in the plug-in’s section add the plug-in code:

/*
 * Plugin: detectRIA v0.1 - detect and set Flash, Silverlight versions
 */
s.detectRIA=new Function("cn", "fp", "sp", "mfv", "msv", "sf", ""
+"cn=cn?cn:'s_ria';msv=msv?msv:2;mfv=mfv?mfv:10;var s=this,sv='',fv=-"
+"1,dwi=0,fr='',sr='',w,mt=s.n.mimeTypes,uk=s.c_r(cn),k=s.c_w('s_cc',"
+"'true',0)?'Y':'N';fk=uk.substring(0,uk.indexOf('|'));sk=uk.substrin"
+"g(uk.indexOf('|')+1,uk.length);if(k=='Y'&&s.p_fo('detectRIA')){if(u"
+"k&&!sf){if(fp){s[fp]=fk;}if(sp){s[sp]=sk;}return false;}if(!fk&&fp)"
+"{if(s.pl&&s.pl.length){if(s.pl['Shockwave Flash 2.0'])fv=2;x=s.pl['"
+"Shockwave Flash'];if(x){fv=0;z=x.description;if(z)fv=z.substring(16"
+",z.indexOf('.'));}}else if(navigator.plugins&&navigator.plugins.len"
+"gth){x=navigator.plugins['Shockwave Flash'];if(x){fv=0;z=x.descript"
+"ion;if(z)fv=z.substring(16,z.indexOf('.'));}}else if(mt&&mt.length)"
+"{x=mt['application/x-shockwave-flash'];if(x&&x.enabledPlugin)fv=0;}"
+"if(fv<=0)dwi=1;w=s.u.indexOf('Win')!=-1?1:0;if(dwi&&s.isie&&w&&exec"
+"Script){result=false;for(var i=mfv;i>=3&&result!=true;i--){execScri"
+"pt('on error resume next: result = IsObject(CreateObject(\"Shockwav"
+"eFlash.ShockwaveFlash.'+i+'\"))','VBScript');fv=i;}}fr=fv==-1?'flas"
+"h not detected':fv==0?'flash enabled (no version)':'flash '+fv;}if("
+"!sk&&sp&&s.apv>=4.1){var tc='try{x=new ActiveXObject(\"AgControl.A'"
+"+'gControl\");for(var i=msv;i>0;i--){for(var j=9;j>=0;j--){if(x.is'"
+"+'VersionSupported(i+\".\"+j)){sv=i+\".\"+j;break;}}if(sv){break;}'"
+"+'}}catch(e){try{x=navigator.plugins[\"Silverlight Plug-In\"];sv=x'"
+"+'.description.substring(0,x.description.indexOf(\".\")+2);}catch('"
+"+'e){}}';eval(tc);sr=sv==''?'silverlight not detected':'silverlight"
+" '+sv;}if((fr&&fp)||(sr&&sp)){s.c_w(cn,fr+'|'+sr,0);if(fr)s[fp]=fr;"
+"if(sr)s[sp]=sr;}}");
s.p_fo=new Function("n",""
+"var s=this;if(!s.__fo){s.__fo=new Object;}if(!s.__fo[n]){s.__fo[n]="
+"new Object;return 1;}else {return 0;}");

“We are considering developing some Silverlight applications. What percentage of our visitors have Silverlight, and if so what version?” Now you will have no problems answering that question.

If you would like more information about using SiteCatalyst with Silverlight, check out the white paper Using SiteCatalyst and Silverlight, available in the Omniture Knowledge Base.

Enjoy!

How To Add Page Views And Visits To All SiteCatalyst eVars

Here is a simple way to add Page Views and Visits to all of your eVar reports (see the update below). While Client Care has the ability to turn on a few things, flip some switches here and there to add visits to some reports, I like having full control over it as much as possible myself (and I’m not really in the mood to wait on hold to get it done). To make this happen we are going to have to use 2 events and a pair of plug-ins. Hopefully you should have a couple of events available to use, and you can find the plug-in code on the SiteCatalyst Plugins page. Here’s how to do it.

First lets get Page Views. To do this we are going to use the Append List plug-in. The Append List (or apl) plug-in utility provides a simple mechanism to append a value to any delimited lists, with the option of a case sensitive or case-insensitive check to insure the value doesn’t already exist in the list. The apl plug-in is referenced by several standard plug-ins but can be used directly in a variety of situations. This is an Omniture supported plug-in and you can find more information about it by accessing the Knowledge Base.

s.apl(L,v,d,u)

L = source list, empty list is accepted
v = value to append
d = list delimiter
u (optional, defaults to 0) Unique value check. 0=no unique check, value is always appended. 1=case insensitive check, append only if value isn’t in list. 2=case sensitive check, append only if value isn’t in list.

What we are going to do is in the s_code.js file, set up this plug-in to fire off an event on every single page view of the site, exactly mimicking the standard Page View metric.

/* Set Page View Event */
s.events=s.apl(s.events,'event1',',',1);

Here is the plug-in code:

/*
* Plugin Utility: apl v1.1
*/
s.apl=new Function("L","v","d","u",""
+"var s=this,m=0;if(!L)L='';if(u){var i,n,a=s.split(L,d);for(i=0;i<a."
+"length;i++){n=a[i];m=m||(u==1?(n==v):(n.toLowerCase()==v.toLowerCas"
+"e()));}}if(!m)L=L?L+d+v:v;return L");

UPDATE: In my eagerness to share this with everyone I skipped the testing process I usually do. Upon testing I realized I a critical, basic error in my logic. By doing it this way, you are setting an event prior to any of the eVars, so they would not be associated with each other, and there for show up as “None” in your report. It is such a simple oversight that I am actually embarrassed that I missed. So now I throw it out to you, the Omniture community, how do you guys think we should try to figure this one out? Or is it even possible to do? Let me know what you think!

Just to be super clear, this will work if you want to add visits to some of your Traffic Sources reports. For example if you want visits from the original referring domains, this will work perfectly for that.

Now lets get Visits. I thought a lot about how to get this. One method you could use would be do the exact same thing we did to get the Page Views event. Set it up on a different event, then call up Omniture Client Care to have them set that event to only record once per visit. Again I wanted to try to avoid using Client Care. I also did not want to go that route since I want this to mimic the Visits metric as close as possible, so I want it to be cookie based. Here I decided to use the Get Visit Start plug-in.

What the Get Visit Start plug-in was designed to do is to determine first page of a visit. It returns 1 on the first plug-in call of the visit, otherwise returns nothing. It uses a 30 minute cookie if possible, otherwise reverts to a session cookie. Always returns nothing if 30 minute or session cookie can’t be set, so it functions very much like the standard Visit’s metric. What I have done is set the plug-in up to populate a variable, then use basic JavaScript to determine if there is a value to the variable that was just set, and if so fire off the Append List plug-in. The theory behind this is the Get Visit Start plug-in will only return a value one time per visit, on the first page view, and at that one and only time fire off a single event.

s.getVisitStart(c)

c=cookie name for tracking (“s_visit” is standard)

Here is how I have it set up. I made up a variable s.visEvent to hold the value of the Get Visit Start Plugin, then fire off event6 if it has a value.

	
/* Set Visit Event */
s.visEvent=s.getVisitStart("s_visit");
if (s.visEvent) s.events=s.apl(s.events,'event6',',',1);

Here is the plug-in code:

/*
 * Get Visit Start
 */
s.getVisitStart=new Function("c",""
+"var s=this,v=1,t=new Date;t.setTime(t.getTime()+1800000);if(s.c_r(c"
+")){v=0}if(!s.c_w(c,1,t)){s.c_w(c,1,0)}if(!s.c_r(c)){v=0}return v;");

Pretty simple. Typically I would have just used the Get Val Once plug-in when I want to get a value of a variable only once per visit, but it didn’t want to work well with the s.events variable.

Enjoy!

SiteCatalyst’s New Marketing Channel Manager – First Look

As many of you may have noticed, there is a new menu available in the SiteCatalyst Admin Console. It was released with the 9/16 maintenance release. It is currently in a closed beta and should go live before the next maintenance release. Have not seen it yet? Well if you have admin access here is what to do. In the Admin Console select Report Suites. In the Report Suite Manager, select any one of your sites and then mouse-over the Edit Settings link. Now you should see something similar to this:
SiteCatalyst Marketing Channels
Here we see a new menu item called Marketing Channels with 5 more menus beyond that, Marketing Channel Manager, Marketing Channel Rules, Marketing Channel Costs, Marketing Channel Classifications, and Visitor Engagement Expiration.

OK so what is it? Well no one at Omniture will say yet, but by the look of the menus it appears to be some form of the Unified Sources Vista Rule and the Channel Manager plug-in. Lets hope it is. That is an extremely popular and powerful Vista rule (and expensive), and the plug-in is extremely heavy in weight, and is challenging to maintain. So if this is that added functionality then prepared to get a lot of great value from this new addition.

UPDATE: From what I hear this is supposed to go into public beta in November 2009, and be released Q2 2010. Anyone attending the Omniture Summit in early 2010 will probably hear much more about it then.

Get More From Your Campaign Tracking using the clickThruQuality Plugin

NOTE: UPDATED 7-22-09 Many of us are using the s.getQueryParam plugin matched with the s.campaign variable to track your paid search. You have your paid search click thru URL and your tracking code right on the end, something like http://webanalyticsland.com/?cid=Google and the query string parameter value gets dumped right in to your campaign measurement. This as we know is the preferred method of tracking paid search. You can pull up your campaigns report, add in your conversion events and there you go. You can see which campaigns converted and which ones didn’t. Unfortunately that gives you an all or nothing view of things. What if you wanted a little more? This sounds like a job for the s.clickThruQuality plugin.

What this plugin does is sets an event on each time a visitor clicks through to your site. Nothing exciting yet. But then when the visitor makes it one page past that landing page, it sets a second event. Now you can see which ad group, landing page or campaign engaged the visitor a little more than the rest. You will end up with a report that looks a little something like this:
Click Thru Quality Report
This example is pretty high level, but using individual tracking codes for your keywords this report can really give you a good look at your paid search campaigns.

First thing you need to do is to set one variable, I have it right after the s.usePlugins=true call.

/* CTQ variables */
var i=1;

Next you will need to use two events. A call to the plugin needs to be added right after your campaign tracking code:

	if(!s.campaign)
		s.campaign=s.getQueryParam('cid',':');
		s.campaign=s.getValOnce(s.campaign,'s_campaign',0);		
		s.clickThruQuality('cid','event1','event2');

In the call to the plugin you need to add in which tracking code you are looking to track, and the two events you want to use. Name one event Click Through and the other Click Past. Then add the actual plugin code into the plugins section of the s_code.js file:

/*
 * Plugin: clickThruQuality 0.8
 */
s.clickThruQuality=new Function("scp","tcth_ev","cp_ev","cff_ev","cf_th", ""
+"if(i<=1){var ev=(s.events?s.events+',':'');if(s.getQueryParam(scp)){s.events=ev+"
+"tcth_ev;if(s.c_r('cf')){var tct=parseInt(s.c_r('cf'))+1;s.c_w('cf',tct"
+",0);if(tct==cf_th&&cff_ev){s.events=s.events+','+cff_ev;};}else{s.c_w('cf',1,0"
+");}}else{if(s.c_r('cf')>=1){s.c_w('cf',0,0);s.events=ev+cp_ev;}}i++;}");

Enjoy!

Plugin To Detect Flash in SiteCatalyst

I was reading a post earlier today on the Omniture Industry Insights site about Flash version detection. In the post, Technical Writer extraordinaire Ben Gaines explains a few methods on how to ‘detecting the version of Adobe Flash Player that visitors have installed in their browsers’. He states there are many methods readily available by doing a simple search, and there are. If you don’t have the skills or patience to hunt around for a way to grab the flash version, let me serve on right up on a silver platter for you. Behold, the Flash Detection plugin.

In your s_code file, add the following call to populate the sprop or evar of your choice

s.prop9=s.getFlash('s_fv');
	if(!s.prop9){
		s.detectFlash('s_fv','10');
		s.prop9=s.getFlash('s_fv');
	}

Then down in the plugin’s section, add the following code

/*
 * Plugin: Flash Detection 0.6 - Detect Flash version number
 */
s.detectFlash=new Function("cn","mfv","vr",""
+"var s=this,fv=-1,dwi=0,r,w,mt=s.n.mimeTypes,fk=s.c_r(cn),k=s.c_w('s"
+"_cc','true',0)?'Y':'N';if(k=='Y'&&!fk){if(s.pl&&s.pl.length){if(s.p"
+"l['Shockwave Flash 2.0'])fv=2;x=s.pl['Shockwave Flash'];if(x){fv=0;"
+"z=x.description;if(z)fv=z.substring(16,z.indexOf('.'));}}else if(mt"
+"&&mt.length){x=mt['application/x-shockwave-flash'];if(x&&x.enabledP"
+"lugin)fv=0;}if(fv<=0)dwi=1;w=s.u.indexOf('Win')!=-1?1:0;if(dwi&&s.i"
+"sie&&w&&execScript){result=false;for(var i=mfv;i>=3&&result!=true;i"
+"--){execScript('on error resume next: result = IsObject(CreateObjec"
+"t(\"ShockwaveFlash.ShockwaveFlash.'+i+'\"))','VBScript');fv=i;}}r=f"
+"v==-1?'flash not detected':fv==0?'flash enabled (no version)':'flas"
+"h '+fv;s.c_w(cn,r,0);return 'true';}else return '';");
s.getFlash=new Function("cn",""
+"var s=this;if(cn&&s.c_r(cn))return s.c_r(cn);");
s.returnFlash=new Function("cn","vr","to",""
+"setTimeout(\"var cn,vr,to,s_dfv=s_gi(s_account);s_dfv.linkTrackVars"
+"=vr,s_dfv.vr=s.getFlash();s_dfv.tl(this,'o','Flash Version Detectio"
+"n')\",to);");

If you have the SiteCatalyst debugger, go ahead and fire it up right now and you will see that I have this plugin enabled here populating s.prop9.

Enjoy!

Reduce the Number of Cookies SiteCatalyst sets with Cookie Combining Plugin

The more advanced we get with our SiteCatalyst implementation, the greater the amount of cookies that can be set. Every time you use a getValOnce a cookie is set. If you are using that a bunch there can easily be over 20 cookies set on a single page ( I have seen as many as 45). If this is a concern for you, then Cookie Combining Utility to the rescue.

This one is pretty easy to implement. Just add both chunks to the Plugin section of your s_code.js file and that’s all there is too it.

/*
 * Function - read combined cookies
 */
s.c_rr=s.c_r;
s.c_r=new Function("k",""
+"var s=this,d=new Date,v=s.c_rr(k),c=s.c_rr('s_pers'),i,m,e;if(v)ret"
+"urn v;k=s.ape(k);i=c.indexOf(' '+k+'=');c=i<0?s.c_rr('s_sess'):c;i="
+"c.indexOf(' '+k+'=');m=i<0?i:c.indexOf('|',i);e=i<0?i:c.indexOf(';'"
+",i);m=m>0?m:e;v=i<0?'':s.epa(c.substring(i+2+k.length,m<0?c.length:"
+"m));if(m>0&&m!=e)if(parseInt(c.substring(m+1,e<0?c.length:e))<d.get"
+"Time()){d.setTime(d.getTime()-60000);s.c_w(s.epa(k),'',d);v='';}ret"
+"urn v;");

/*
 * Function - write combined cookies
 */
s.c_wr=s.c_w;
s.c_w=new Function("k","v","e",""
+"var s=this,d=new Date,ht=0,pn='s_pers',sn='s_sess',pc=0,sc=0,pv,sv,"
+"c,i,t;d.setTime(d.getTime()-60000);if(s.c_rr(k)) s.c_wr(k,'',d);k=s"
+".ape(k);pv=s.c_rr(pn);i=pv.indexOf(' '+k+'=');if(i>-1){pv=pv.substr"
+"ing(0,i)+pv.substring(pv.indexOf(';',i)+1);pc=1;}sv=s.c_rr(sn);i=sv"
+".indexOf(' '+k+'=');if(i>-1){sv=sv.substring(0,i)+sv.substring(sv.i"
+"ndexOf(';',i)+1);sc=1;}d=new Date;if(e){if(e.getTime()>d.getTime())"
+"{pv+=' '+k+'='+s.ape(v)+'|'+e.getTime()+';';pc=1;}}else{sv+=' '+k+'"
+"='+s.ape(v)+';';sc=1;}if(sc) s.c_wr(sn,sv,0);if(pc){t=pv;while(t&&t"
+".indexOf(';')!=-1){var t1=parseInt(t.substring(t.indexOf('|')+1,t.i"
+"ndexOf(';')));t=t.substring(t.indexOf(';')+1);ht=ht<t1?t1:ht;}d.set"
+"Time(ht);s.c_wr(pn,pv,d);}return v==s.c_r(s.epa(k));");

Just add that code and watch the number of cookies being set on each page drop right down.