<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Analytics Land &#187; plugin</title>
	<atom:link href="http://webanalyticsland.com/sitecatalyst-implementation/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://webanalyticsland.com</link>
	<description>Omniture SiteCatalyst Implementation Optimization.</description>
	<lastBuildDate>Sat, 19 Nov 2011 02:24:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Capture Mobile Device Screen Orientation In SiteCatalyst</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/capture-mobile-device-screen-orientation-in-sitecatalyst/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/capture-mobile-device-screen-orientation-in-sitecatalyst/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 02:24:17 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[reports]]></category>
		<category><![CDATA[sitecatalyst]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=647</guid>
		<description><![CDATA[Recently I was speaking to someone who was in the process of creating an tablet experience for their visitors. At one point they asked the question &#8220;of my iPad visitors, how do I find out in what format do they view my site the most in, landscape or portrait?&#8221;. I started going through all of [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was speaking to someone who was in the process of creating an tablet experience for their visitors. At one point they asked the question &#8220;of my iPad visitors, how do I find out in what format do they view my site the most in, landscape or portrait?&#8221;. I started going through all of the reports in SiteCatalyst and tried to find the answer, but that information just was not available. So I decided to whip a little bit of code that would figure this out for us. I call this the screenOrientation plug-in.  </p>
<p>Basically what this will do is it will check to see in what position the mobile visitor is viewing the site in, whether they are viewing the site in a portrait or a landscape view when the page loads, and capture that value into a SiteCatalyst variable. </p>
<p>To implement this plug-in you first need to take this code, and add it to your s_code file near the rest of your plug-ins.</p>
<pre class="brush: jscript">
function screenOrientation(){switch(window.orientation){case 0:case 180:return(&quot;Portrait&quot;);break;case 90:case -90:return(&quot;Landscape&quot;);}window.scroll(0,0)}
</pre>
<p>Next in the do_plugins section of the s_code file, add the call to the plug-in to what ever SiteCatalyst variable you want this data captured in. In the example here you can see I am capturing it in s.prop1</p>
<pre class="brush: jscript">
s.prop1=screenOrientation();
</pre>
<p>Thats all it takes. Once the code is implemented, if the device does not have an orientation value the variable will not capture anything, but if the visitor is on a mobile device with an orientation value, the value of Landscape or Portrait will be captured on each page load. You will end up with a report that looks something like this:<br />
<br />
<img alt="Mobile Screen Orientation Report" src="http://webanalyticsland.com/images/so2.jpg" title="Mobile Screen Orientation Report" class="alignnone" width="796" height="406" /><br />
<br />
To make it easier to access the report I also moved it into the Mobile report menu by using the customize menus option in the admin console of SiteCatalyst.<br />
<br />
<img alt="SiteCatalyst Mobile Reports" src="http://webanalyticsland.com/images/so11.png" title="SiteCatalyst Mobile Reports" class="alignnone" width="485" height="354" /></p>
<p>enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/capture-mobile-device-screen-orientation-in-sitecatalyst/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Capture A Query String Parameter From A Referring URL In SiteCatalyst</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/capture-query-string-parameter-from-referring-url/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/capture-query-string-parameter-from-referring-url/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 02:13:42 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sitecatalyst]]></category>
		<category><![CDATA[s_code.js]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=617</guid>
		<description><![CDATA[Recently someone had asked the question, how do I capture a query string parameter that&#8217;s on referring URL? We all know how to grab a query string parameter from the current page URL by using the getQueryParam SiteCatalyst plug-in, but most people don&#8217;t know that plug-in can be used to get a query string parameter [...]]]></description>
			<content:encoded><![CDATA[<p>Recently someone had asked the question, <em>how do I capture a query string parameter that&#8217;s on referring URL?</em> We all know how to grab a query string parameter from the current page URL by using the <a href="http://webanalyticsland.com/sitecatalyst-plugins/getqueryparam/">getQueryParam SiteCatalyst plug-in</a>, but most people don&#8217;t know that plug-in can be used to get a query string parameter from the referring URL as well. I once had a real unique implementation that was not using that plug-in and needed to capture that value. I wanted to keep the implementation really light so I decided to give it a try using a smaller bit of code. I broke out a little JavaScript magic to see if I could make it happen simpler than using that plug-in. Turns out it&#8217;s not too difficult to accomplish, in fact I got it down to just a single line of code.<br />
</p>
<pre class="brush: jscript">
function getRefQueryParam(a){a=a.replace(/[\[]/,&quot;\\[&quot;).replace(/[\]]/,&quot;\\]&quot;);a=RegExp(&quot;[\\?&amp;]&quot;+a+&quot;=([^&amp;#]*)&quot;).exec(document.referrer);return a==null?&quot;&quot;:a[1]};
</pre>
<p>
Its a little function called getRefQueryParam. To use it just place that code in your s_code file, and then call it with the name of the query string parameter you want to capture. In this example I want to capture the value of the parameter forumID= from the referring URL and record it in s.prop1.<br />
</p>
<pre class="brush: jscript">
s.prop1=getRefQueryParam(&#039;forumID&#039;);
</pre>
<p>
With a little JavaScript goodness it is an easy value to capture.<br />
<br />
Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/capture-query-string-parameter-from-referring-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Track HBX Style Links in SiteCatalyst</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/track-hbx-style-links-in-sitecatalyst/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/track-hbx-style-links-in-sitecatalyst/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 20:44:40 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[HBX]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sitecatalyst]]></category>
		<category><![CDATA[s_code.js]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=398</guid>
		<description><![CDATA[I hear from a lot of people migrating from HBX to SiteCatalyst who are looking for ways to make that process a little easier. One of the hurdles I see is trying to migrate all of their HBX link tracking that is already in place to a format that SiteCatalyst can easily understand. That is [...]]]></description>
			<content:encoded><![CDATA[<p>I hear from a lot of people migrating from HBX to SiteCatalyst who are looking for ways to make that process a little easier. One of the hurdles I see is trying to migrate all of their HBX link tracking that is already in place to a format that SiteCatalyst can easily understand. That is an easy one to tackle. It&#8217;s called the setupLinkTrack plug-in.</p>
<p>Other than tracking all of you current HBX coded links, any SiteCatalyst user can get some benefit from it. Here is another great use for this plug-in. Recently I was reading a great article from <a href="http://twitter.com/adamgreco">@adamgreco</a> about <a href="http://www.the-omni-man.com/sitecatalyst/adamgreco/2010/08/23/tracking-navigation/">learning to track website navigation</a>. It is a really great article and if you have not had a chance to read it you should go check it out. In one part of the article Adam writes <em>&#8220;you should have your developer write code that will pass the name of the link to a Traffic Variable (sProp) when a visitor clicks on each link in your navigation&#8221;</em>. Well I&#8217;m the guy responsible for the tracking code for my website, so how can I track those links without adding a whole ton of JavaScript onclicks or some other server side hacks? This plug-in will easily handle that, without adding the extra server calls that come with the standard SiteCatalyst link tracking.</p>
<p>First take the plug-in code and add it to the plug-in section of your s_code.js file. Make sure you have the <a href="http://webanalyticsland.com/sitecatalyst-implementation/sitecatalyst-utility-functions/">utility functions</a> s.split and s.apl.</p>
<pre class="brush: jscript">
/*
 * Plugin: setupLinkTrack 2.0 - return links for HBX-based link
 *         tracking in SiteCatalyst (requires s.split and s.apl)
 */
s.setupLinkTrack=new Function(&quot;vl&quot;,&quot;c&quot;,&quot;&quot;
+&quot;var s=this;var l=s.d.links,cv,cva,vla,h,i,l,t,b,o,y,n,oc,d=&#039;&#039;;cv=s.&quot;
+&quot;c_r(c);if(vl&amp;&amp;cv!=&#039;&#039;){cva=s.split(cv,&#039;^^&#039;);vla=s.split(vl,&#039;,&#039;);for(&quot;
+&quot;x in vla)s._hbxm(vla[x])?s[vla[x]]=cva[x]:&#039;&#039;;}s.c_w(c,&#039;&#039;,0);if(!s.e&quot;
+&quot;o&amp;&amp;!s.lnk)return &#039;&#039;;o=s.eo?s.eo:s.lnk;y=s.ot(o);n=s.oid(o);if(s.eo&amp;&quot;
+&quot;&amp;o==s.eo){while(o&amp;&amp;!n&amp;&amp;y!=&#039;BODY&#039;){o=o.parentElement?o.parentElement&quot;
+&quot;:o.parentNode;if(!o)return &#039;&#039;;y=s.ot(o);n=s.oid(o);}for(i=0;i&lt;4;i++&quot;
+&quot;)if(o.tagName)if(o.tagName.toLowerCase()!=&#039;a&#039;)if(o.tagName.toLowerC&quot;
+&quot;ase()!=&#039;area&#039;)o=o.parentElement;}b=s._LN(o);o.lid=b[0];o.lpos=b[1];&quot;
+&quot;if(s.hbx_lt&amp;&amp;s.hbx_lt!=&#039;manual&#039;){if((o.tagName&amp;&amp;s._TL(o.tagName)==&#039;&quot;
+&quot;area&#039;)){if(!s._IL(o.lid)){if(o.parentNode){if(o.parentNode.name)o.l&quot;
+&quot;id=o.parentNode.name;else o.lid=o.parentNode.id}}if(!s._IL(o.lpos))&quot;
+&quot;o.lpos=o.coords}else{if(s._IL(o.lid)&lt;1)o.lid=s._LS(o.lid=o.text?o.t&quot;
+&quot;ext:o.innerText?o.innerText:&#039;&#039;);if(!s._IL(o.lid)||s._II(s._TL(o.lid&quot;
+&quot;),&#039;&lt;img&#039;)&gt;-1){h=&#039;&#039;+o.innerHTML;bu=s._TL(h);i=s._II(bu,&#039;&lt;img&#039;);if(bu&quot;
+&quot;&amp;&amp;i&gt;-1){eval(\&quot;__f=/ src\s*=\s*[\&#039;\\\&quot;]?([^\&#039;\\\&quot; ]+)[\&#039;\\\&quot;]?/i\&quot;)&quot;
+&quot;;__f.exec(h);if(RegExp.$1)h=RegExp.$1}o.lid=h}}}h=o.href?o.href:&#039;&#039;;&quot;
+&quot;i=h.indexOf(&#039;?&#039;);h=s.linkLeaveQueryString||i&lt;0?h:h.substring(0,i);l&quot;
+&quot;=s.linkName?s.linkName:s._hbxln(h);t=s.linkType?s.linkType.toLowerC&quot;
+&quot;ase():s.lt(h);oc=o.onclick?&#039;&#039;+o.onclick:&#039;&#039;;cv=s.pageName+&#039;^^&#039;+o.lid&quot;
+&quot;+&#039;^^&#039;+s.pageName+&#039; | &#039;+(o.lid=o.lid?o.lid:&#039;no &amp;lid&#039;)+&#039;^^&#039;+o.lpos;if&quot;
+&quot;(t&amp;&amp;(h||l)){cva=s.split(cv,&#039;^^&#039;);vla=s.split(vl,&#039;,&#039;);for(x in vla)s&quot;
+&quot;._hbxm(vla[x])?s[vla[x]]=cva[x]:&#039;&#039;;}else if(!t&amp;&amp;oc.indexOf(&#039;.tl(&#039;)&lt;&quot;
+&quot;0){s.c_w(c,cv,0);}else return &#039;&#039;&quot;);
s._IL=new Function(&quot;a&quot;,&quot;var s=this;return a!=&#039;undefined&#039;?a.length:0&quot;);
s._II=new Function(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;var s=this;return a.indexOf(b,c?c:0)&quot;);
s._IS=new Function(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;&quot;
+&quot;var s=this;return b&gt;s._IL(a)?&#039;&#039;:a.substring(b,c!=null?c:s._IL(a))&quot;);
s._LN=new Function(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;&quot;
+&quot;var s=this;b=a.href;b+=a.name?a.name:&#039;&#039;;c=s._LVP(b,&#039;lid&#039;);d=s._LVP(&quot;
+&quot;b,&#039;lpos&#039;);return[c,d]&quot;);
s._LVP=new Function(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;,&quot;&quot;
+&quot;var s=this;c=s._II(a,&#039;&amp;&#039;+b+&#039;=&#039;);c=c&lt;0?s._II(a,&#039;?&#039;+b+&#039;=&#039;):c;if(c&gt;-1)&quot;
+&quot;{d=s._II(a,&#039;&amp;&#039;,c+s._IL(b)+2);e=s._IS(a,c+s._IL(b)+2,d&gt;-1?d:s._IL(a)&quot;
+&quot;);return e}return &#039;&#039;&quot;);
s._LS=new Function(&quot;a&quot;,&quot;&quot;
+&quot;var s=this,b,c=100,d,e,f,g;b=(s._IL(a)&gt;c)?escape(s._IS(a,0,c)):esca&quot;
+&quot;pe(a);b=s._LSP(b,&#039;%0A&#039;,&#039;%20&#039;);b=s._LSP(b,&#039;%0D&#039;,&#039;%20&#039;);b=s._LSP(b,&#039;%&quot;
+&quot;09&#039;,&#039;%20&#039;);c=s._IP(b,&#039;%20&#039;);d=s._NA();e=0;for(f=0;f&lt;s._IL(c);f++){g&quot;
+&quot;=s._RP(c[f],&#039;%20&#039;,&#039;&#039;);if(s._IL(g)&gt;0){d[e++]=g}}b=d.join(&#039;%20&#039;);retu&quot;
+&quot;rn unescape(b)&quot;);
s._LSP=new Function(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;var s=this;d=s._IP(a,b);return d&quot;
+&quot;.join(c)&quot;);
s._IP=new Function(&quot;a&quot;,&quot;b&quot;,&quot;var s=this;return a.split(b)&quot;);
s._RP=new Function(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;&quot;
+&quot;var s=this;d=s._II(a,b);if(d&gt;-1){a=s._RP(s._IS(a,0,d)+&#039;,&#039;+s._IS(a,d&quot;
+&quot;+s._IL(b),s._IL(a)),b,c)}return a&quot;);
s._TL=new Function(&quot;a&quot;,&quot;var s=this;return a.toLowerCase()&quot;);
s._NA=new Function(&quot;a&quot;,&quot;var s=this;return new Array(a?a:0)&quot;);
s._hbxm=new Function(&quot;m&quot;,&quot;var s=this;return (&#039;&#039;+m).indexOf(&#039;{&#039;)&lt;0&quot;);
s._hbxln=new Function(&quot;h&quot;,&quot;var s=this,n=s.linkNames;if(n)return s.pt(&quot;
+&quot;n,&#039;,&#039;,&#039;lnf&#039;,h);return &#039;&#039;&quot;);
</pre>
<p>Next in the s_doPlugins section of the s_code file you need a couple lines of setup.<br />
<strong><code><br />
s.hbx_lt = "auto" // manual, auto<br />
s.setupLinkTrack("prop1,prop2,prop3,prop4","SC_LINKS");<br />
</code></strong><br />
The plug-in will use 4 variables and a name for a cookie it will set. For this example I am going to use props 1 thru 4. </p>
<p>Next we have the actual code that will appear in the anchor tag that the plug-in will look for. It is a simple name attribute tag of <strong>lid</strong> and <strong>lpos</strong>. This is what a link would look like with the code properly formatted.<br />
<strong><code><br />
&lt;a href="my-page.php" name="&#038;lid=Featured Articles&#038;lpos=Left Nav"&gt;Cool Article Name&lt;/a&gt;<br />
</code></strong></p>
<p>Here&#8217;s what it will do. After clicking on a link that contains a lid and lpos (the exact link shown above), this is what you will find in the debugger on the page you land on:<br />
<img src="http://webanalyticsland.com/images/db1.jpg" alt="Debugger 1" /><br />
The plug-in entered the s.pageName value of the page that the click occurred into prop1, the value of lid into prop2, a combination of the prop1 and the value of lid into prop3 and the value of lpos in prop4. </p>
<p>Lets change up what we include in the actual link code. Lets remove the lid from the tag and just use this link:<br />
<strong><code><br />
&lt;a href="my-page.php" name="&#038;lpos=Left Nav"&gt;Cool Article Name&lt;/a&gt;<br />
</code></strong></p>
<p>This is what we will get from the debugger:<br />
<img src="http://webanalyticsland.com/images/db2.jpg" alt="Debugger 2" /><br />
You can see by not using the lid tag then the plug-in will use the actual anchor text in those positions.</p>
<p>Now lets say you are not interested in capturing the previous pageName value, or the combined previous pageName/lid value. You can just omit those variables in the plug-in setup. Change the code to:<br />
<strong><code><br />
s.hbx_lt = "auto" // manual, auto<br />
s.setupLinkTrack(",prop2,,prop4","SC_LINKS");<br />
</code><br />
</strong><br />
You can see I left the commas in there as empty place holders. Clicking the link with that setup and a lid and lpos value will return this in the debugger:<br />
<img src="http://webanalyticsland.com/images/db3.jpg" alt="Debugger 3" /></p>
<p>What about the other links on the page? What if they do not include a lid or lpos value? The plug-in will track those also. Clicking one of those links will return this in the debugger:<br />
<img src="http://webanalyticsland.com/images/db4.jpg" alt="Debugger 4" /><br />
The plug-in will still capture the previous pageName value, the anchor text and the combined values of the two.</p>
<p>I&#8217;m sure by now you noticed that auto/manual setting. Up to now its been set on auto. Let&#8217;s flip it to manual and click a link on the page that does not include any code. Here is what you will get:<br />
<img src="http://webanalyticsland.com/images/db5.jpg" alt="Debugger 5" /><br />
You will only get the two previous pageName values. If I would have omitted those two variables like I did earlier then it would have not returned anything. If you click on a link with a lid and lpos variables then  it will perform the same as if it were set to auto.</p>
<p>If you want to not add the code to the links so you can track all of the links on a page, but you only want to do it on a specific page and not the whole site you can then wrap the code in an if statement like this:<br />
<strong><code><br />
if(s.pageName=='Home'){<br />
s.hbx_lt = "auto" // manual, auto<br />
s.setupLinkTrack(",prop2,,prop4","SC_LINKS");<br />
}<br />
</code></strong><br />
You could also do that using document.location (or a million other ways to identify a specific page).</p>
<p>Since it also grabs the previous page value I no longer need the previous pageName plug-in (useful when using the getPercentPageViewed plug-in). </p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/track-hbx-style-links-in-sitecatalyst/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Track Hash Query Parameters in Omniture SiteCatalyst</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/track-hash-query-parameters/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/track-hash-query-parameters/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 04:50:13 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[getqueryparam]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sitecatalyst]]></category>
		<category><![CDATA[s_code.js]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=320</guid>
		<description><![CDATA[Do you have a site that uses a hash symbol in the URL with query parameters and you want a way to track them in SiteCatalyst? Well you have come to the right place. 
What am I talking about? Lets say you have a URL that looks like this:
http://webanalyticsland.com/#cid=Hash_Param_Test
and you want to capture the value [...]]]></description>
			<content:encoded><![CDATA[<p>Do you have a site that uses a hash symbol in the URL with query parameters and you want a way to track them in SiteCatalyst? Well you have come to the right place. </p>
<p>What am I talking about? Lets say you have a URL that looks like this:<br />
<a href="http://webanalyticsland.com/#cid=Hash_Param_Test">http://webanalyticsland.com/#cid=Hash_Param_Test</a><br />
and you want to capture the value of <strong>cid=</strong>. The standard getQueryParam plugin will not work in this case. It looks for a question mark in the URL, and as you can see this one did not have one.  </p>
<p>To capture this value we can use the <strong>getHashQueryParam</strong> s_code.js plug-in. What this plug-in does is looks for the hash symbol <strong>#</strong> at the end of the URL, then looks for the parameter you have listed in the function, then inserts the value in to the associated variable. This works just like the standard getQueryParam plugin, but looks for the hash instead.</p>
<p>Here&#8217;s how to use it. Insert this line of code in the s_doPlugins(s) section of your s_code.js file. Make sure you use the correct variable you want the metrics recorded in and which query string you want it to be associated with. I&#8217;m using <strong>s.prop17</strong> and <strong>cid</strong> in this example.</p>
<pre class="brush: jscript">
s.prop17=getHashQueryParam(&#039;cid&#039;);
</pre>
<p>Next enter this code in the plug-in&#8217;s section of your s_code file:</p>
<pre class="brush: jscript">
/*
 * Plugin: getHashQueryParam
 */
function getHashQueryParam(a){
var QueryString=window.location.search.substring(1);
if(QueryString==&#039;&#039;){var WinExtra=window.location.hash;
if(WinExtra.length &gt; 0){if(WinExtra.indexOf(a)&gt;-1){
QueryString=WinExtra.substr(WinExtra.indexOf(a))}}}
var returnValue=&#039;&#039;;var keyValPairs=QueryString.split(&#039;&amp;&#039;);
if(!keyValPairs){ keyValPairs = new Array();
keyValPairs[keyValPairs.length]=QueryString}
for(var counter=0;counter&lt;keyValPairs.length;counter++){
var keyVal=keyValPairs[counter].split(&#039;=&#039;);if(keyVal[0]==a){
returnValue=keyVal[1];break;}}return returnValue;}
</pre>
<p><a href="http://webanalyticsland.com/#cid=Hash_Param_Test">Here is an example of it live in action.</a> After you click on the link, open the debugger you will see the value entered in s.prop17.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/track-hash-query-parameters/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Forget Your SiteCatalyst Utility Functions!</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/sitecatalyst-utility-functions/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/sitecatalyst-utility-functions/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 15:56:48 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[enhancements]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sitecatalyst]]></category>
		<category><![CDATA[s_code.js]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=314</guid>
		<description><![CDATA[Have you ever tried to use a new plug-in and found it did not work? You were probably missing a utility function. Utility functions are designed to work with SiteCatalyst plug-ins. There are 6 utility functions that are commonly used. They are apl, p_c, p_gh, split, replace, and join.
These functions do things like join elements [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever tried to use a new plug-in and found it did not work? You were probably missing a utility function. Utility functions are designed to work with SiteCatalyst plug-ins. There are 6 utility functions that are commonly used. They are <strong>apl</strong>, <strong>p_c</strong>, <strong>p_gh</strong>, <strong>split</strong>, <strong>replace</strong>, and <strong>join</strong>.</p>
<p>These functions do things like join elements of an array into a string delimiter by a string, replaces characters in a string, splits a string on a specific character, append a value to any delimited lists, and more. THese utility functions are referenced by several standard plug-ins.</p>
<p>Here&#8217;s how I do it. I take all these utility functions and wrap them all up in one neat package, and include this as one of my standard plug-ins to add when creating a s_code file. This way not thing is missed, nothing is forgotten and all of my plug-ins will work no problem.</p>
<p>Here&#8217;s what it looks like:</p>
<pre class="brush: jscript">
/*
 * Utility Functions: apl, p_c, p_gh, split, replace, join
 */
s.apl=new Function(&quot;L&quot;,&quot;v&quot;,&quot;d&quot;,&quot;u&quot;,&quot;&quot;
+&quot;var s=this,m=0;if(!L)L=&#039;&#039;;if(u){var i,n,a=s.split(L,d);for(i=0;i&lt;a.&quot;
+&quot;length;i++){n=a[i];m=m||(u==1?(n==v):(n.toLowerCase()==v.toLowerCas&quot;
+&quot;e()));}}if(!m)L=L?L+d+v:v;return L&quot;);
s.p_c=new Function(&quot;v&quot;,&quot;c&quot;,&quot;&quot;
+&quot;var x=v.indexOf(&#039;=&#039;);return c.toLowerCase()==v.substring(0,x&lt;0?v.le&quot;
+&quot;ngth:x).toLowerCase()?v:0&quot;);
s.p_gh=new Function(&quot;&quot;
+&quot;var s=this;if(!s.eo&amp;&amp;!s.lnk)return &#039;&#039;;var o=s.eo?s.eo:s.lnk,y=s.ot(&quot;
+&quot;o),n=s.oid(o),x=o.s_oidt;if(s.eo&amp;&amp;o==s.eo){while(o&amp;&amp;!n&amp;&amp;y!=&#039;BODY&#039;){&quot;
+&quot;o=o.parentElement?o.parentElement:o.parentNode;if(!o)return &#039;&#039;;y=s.&quot;
+&quot;ot(o);n=s.oid(o);x=o.s_oidt}}return o.href?o.href:&#039;&#039;;&quot;);
s.split=new Function(&quot;l&quot;,&quot;d&quot;,&quot;&quot;
+&quot;var i,x=0,a=new Array;while(l){i=l.indexOf(d);i=i&gt;-1?i:l.length;a[x&quot;
+&quot;++]=l.substring(0,i);l=l.substring(i+d.length);}return a&quot;);
s.repl=new Function(&quot;x&quot;,&quot;o&quot;,&quot;n&quot;,&quot;&quot;
+&quot;var i=x.indexOf(o),l=n.length;while(x&amp;&amp;i&gt;=0){x=x.substring(0,i)+n+x.&quot;
+&quot;substring(i+o.length);i=x.indexOf(o,i+l)}return x&quot;);
s.join = new Function(&quot;v&quot;,&quot;p&quot;,&quot;&quot;
+&quot;var s = this;var f,b,d,w;if(p){f=p.front?p.front:&#039;&#039;;b=p.back?p.back&quot;
+&quot;:&#039;&#039;;d=p.delim?p.delim:&#039;&#039;;w=p.wrap?p.wrap:&#039;&#039;;}var str=&#039;&#039;;for(var x=0&quot;
+&quot;;x&lt;v.length;x++){if(typeof(v[x])==&#039;object&#039; )str+=s.join( v[x],p);el&quot;
+&quot;se str+=w+v[x]+w;if(x&lt;v.length-1)str+=d;}return f+str+b;&quot;);
</pre>
<p>I just make sure that is block is included in every s_code file. Then I am assured that every plug-in I use can find the correct utility function it needs to work properly.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/sitecatalyst-utility-functions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Optimize the Time Parting Plugin to get More Detail and Use Less Variables</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/time-parting-granularity-using-saint/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/time-parting-granularity-using-saint/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 21:12:32 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[day parting]]></category>
		<category><![CDATA[enhancements]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[time parting]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=269</guid>
		<description><![CDATA[The Time Parting Plug-in is one of the more popular SiteCatalyst plug-ins available. A standard implementation of the Time Parting plug-in will consume 3 variables. One for Time of Day, one for the Day of Week, and one for Weekday/Weekend. How can we improve this to get more information, and more importantly use less variables? [...]]]></description>
			<content:encoded><![CDATA[<p>The Time Parting Plug-in is one of the more popular SiteCatalyst plug-ins available. A standard implementation of the <a href="http://webanalyticsland.com/sitecatalyst-implementation/dayparting-plugin-in-sitecatalyst/">Time Parting plug-in</a> will consume 3 variables. One for <strong>Time of Day</strong>, one for the <strong>Day of Week</strong>, and one for <strong>Weekday/Weekend</strong>. How can we improve this to get more information, and more importantly use less variables? Here is how I have been doing it.</p>
<p>I use a combination of stacking the variables and SAINT uploads. For those of you who are not familiar with SAINT, Omniture describes it as, <em>&#8220;&#8230;an acronym for SiteCatalyst Attribute Importing and Naming Tool. This tool enables you to download the classifications template, apply attributes to it, and then upload the data, thereby enhancing your SiteCatalyst reports with the new attributes.&#8221;</em> This will allow us to upload a lot of detail about any variable you record.</p>
<p>Here&#8217;s how I&#8217;m doing it on this site. First I am using the 2.0 version of the plug-in and not the 1.4 version that I describe in a <a href="http://webanalyticsland.com/sitecatalyst-implementation/dayparting-plugin-in-sitecatalyst/">previous post</a>. The 2.0 version includes support for Daylight Savings time and globalizes the year. You can find the 2.0 version from the SiteCatalyst Knowledge Base. If you prefer to use the 1.4 version, you can find it on this site.</p>
<pre class="brush: jscript">
/* Set Time Parting Variables */
s_hour=s.getTimeParting(&#039;h&#039;,&#039;-5&#039;);
s_day=s.getTimeParting(&#039;d&#039;,&#039;-5&#039;);
s_timepart=s_day+&quot;|&quot;+s_hour;
s.prop16=s_timepart.toLowerCase();
if (s.visEvent) s.eVar16=s.prop16;
</pre>
<p>Ok, let me explain whats going on here. As I said before the Time Parting plug-in captures 3 variables. If you notice in my code I am only using two of them. I don&#8217;t need to capture Weekday/Weekend anymore. I will take care of that later. The other two, I capture in two blank variables I created, s_day and s_hour. Next I combine the two of them in a single variable I call s_timepart, separated by a pipe. Then to ensure everything is consistent I copy the variable in all lower case to the prop that I am going to use. This next part is a little different. In the eVar I only want capture this value once per visit. Typically a simple getValOnce will be enough to get it done. Well then what happens when the visit extends from one time part into another? In that situation the Time Parting value will be different and therefore getValOnce will capture this as a new value since it has changed. I don&#8217;t want that to happen, I only want it once per visit. So this is when I tie in using the <a href="http://webanalyticsland.com/plugins/Get_Visit_Start_Plugin.pdf">get Visit Start</a> plug-in. This guarantees I will only capture the value only one time per visit.</p>
<p>This will return a report that looks like this:<br />
<img src="http://webanalyticsland.com/images/time-parting.jpg" alt="Time Parting Report in SiteCatalyst" /></p>
<p>We now have a total of 672 possible options in this report. The next thing we want to do is to classify these using SAINT. I set up 5 different categories to use. Weekday/Weekend (this is why we don&#8217;t need to capture it in the code, Day of Week, Hour of Day, Hour Part and AM/PM.<br />
<img src="http://webanalyticsland.com/images/saint-setup.png" alt="SAINT Setup" /></p>
<p>I then created the template to use that contains all of these values.<br />
<img src="http://webanalyticsland.com/images/time-parting-saint-template.png" alt="SAINT Template" /><br />
<a href="http://webanalyticsland.com/dayparting-saint.txt">You can download a copy of the template that I use here.</a><br />
Upload the template and that&#8217;s all there is to it. Do you have more conversions in the bottom of the hour or the top of the hour? How about morning vs afternoon? Which whole hour is the most profitable? Now you have an easy way to break down your time parting with finer granularity, at the sime time saving your self a couple of variables.</p>
<p>Enjoy! </p>
]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/time-parting-granularity-using-saint/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Track Your Visitors Copied Text With SiteCatalyst Plug-in</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/track-copied-text-plugin/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/track-copied-text-plugin/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 11:00:56 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[enhancements]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[s_code.js]]></category>
		<category><![CDATA[visitors]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=295</guid>
		<description><![CDATA[To me Web Analytics is the science of analyzing visitor behavior in order to improve the Web Site for the purpose of increasing conversion. Anytime I can use web analytics to help the visitor find what they are looking for, I feel I&#8217;m doing my job. But lets say your visitors are finding what they [...]]]></description>
			<content:encoded><![CDATA[<p>To me Web Analytics is the science of analyzing visitor behavior in order to improve the Web Site for the purpose of increasing conversion. Anytime I can use web analytics to help the visitor find what they are looking for, I feel I&#8217;m doing my job. But lets say your visitors are finding what they are looking for, but it is just not as easy as it could be? How would I know?</p>
<p>One thing I have been playing with is to monitor what content my visitors are selecting and copying from the site. If I see a lot of visitors copying my email address, maybe I should make the contact form a little easier to be found. If I see a lot of copying of some sample code, maybe I should make it easier to download it, or include a pdf copy. But how do I find out how to capture what my visitors copy? Here you go. </p>
<p>This is all done by adding a plug-in and a bit of code to the s_code file. This code looks for any time some text is copied and sets it in a prop and fires an event. This will work if the visitor highlights text and goes the right click/copy route, or by hitting Control/Command + C. You will need either 1 eVar and 1 event, or a 1 prop to use. If you want to go the eVar and event route, take this code and place it some where BEFORE the <strong>function s_doPlugins(s)</strong> call: </p>
<pre class="brush: jscript">
var eventAttached=false;
if(!eventAttached){eventAttached = true;
function trackCopy(){
var overrides = {&#039;events&#039;:&#039;event8&#039;,&#039;eVar18&#039;:getCopiedText()};
	s.templtv=s.linkTrackVars;
	s.templte=s.linkTrackEvents;
   	s.linkTrackVars=&#039;eVar18,events&#039;;
	s.linkTrackEvents=s.events=&#039;event8&#039;;
	s.tl(true, &#039;o&#039;, &#039;Text Copied&#039;, overrides);
	if(s.templtv) s.linkTrackVars=s.templtv;
	if(s.templte) s.linkTrackEvents=s.templte;
}
</pre>
<p>Insert the eVar and event you are going to use where you see them in the code. If you decide to just use a single prop instead, then use this bit of code, again before the <strong>function s_doPlugins(s)</strong> call: </p>
<pre class="brush: jscript">
var eventAttached=false;
if(!eventAttached){eventAttached = true;
function trackCopy(){
var overrides = {&#039;prop49&#039;:getCopiedText()};
	s.templtv=s.linkTrackVars;
   	s.linkTrackVars=&#039;prop49&#039;;
	s.tl(true, &#039;o&#039;, &#039;Text Copied&#039;, overrides);
	if(s.templtv) s.linkTrackVars=s.templtv;
}
</pre>
<p>Insert the prop you want to use where you see it set. Next take this code and put it in the plug-in&#8217;s section of the s_code file:</p>
<pre class="brush: jscript">
function getCopiedText() {
if (document.selection){return document.selection.createRange().text;}
else if (window.getSelection){return window.getSelection();}return &#039;&#039;;}
if(document.body &amp;&amp; document.body.attachEvent){
document.body.attachEvent(&quot;oncopy&quot;, trackCopy);}
else if (document.body &amp;&amp; document.body.addEventListener){
document.body.addEventListener(&#039;copy&#039;,trackCopy, false);}}
</pre>
<p>What are we going to end up with? You will get a report that looks like this:<br />
<img src="http://webanalyticsland.com/images/copied-text.png" alt="Copied Text Report" /></p>
<p>It&#8217;s pretty interesting to see what your visitors are choosing to copy. Now do I expect to find huge some game changing incite that will lead me to make a change to the Web Site that will increase my conversion rate 100% with this report? Probably not. Do I expect to find one more place that allows me to make another 1% improvement? I sure do. Remember, all those 1% improvements add up. <img src='http://webanalyticsland.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Big thanks to <strong>kgs/ksmith</strong> in the Omniture Developer Connection for the original idea to do this.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/track-copied-text-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Additional Methods To Measure Interaction Using The Get Time To Complete Plug-In</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/additional-methods-to-measure-interaction-using-the-get-time-to-complete-plug-in/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/additional-methods-to-measure-interaction-using-the-get-time-to-complete-plug-in/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 15:58:54 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sitecatalyst]]></category>
		<category><![CDATA[s_code.js]]></category>
		<category><![CDATA[tracking]]></category>
		<category><![CDATA[visitors]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=284</guid>
		<description><![CDATA[Recently there was a great article on the Omniture Blog all about Capturing Time Spent on . . . well, just about anything. It&#8217;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 [...]]]></description>
			<content:encoded><![CDATA[<p>Recently there was a great article on the Omniture Blog all about <a href="http://blogs.omniture.com/2009/12/10/time-spent-interacting-with-just-about-anything/">Capturing Time Spent on . . . well, just about anything</a>. It&#8217;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. </p>
<p>The getTimeToComplete plug-in will track the time it takes a user to complete some process on your site. The &#8220;clock&#8221; begins when you call the plug-in with the value &#8220;start&#8221; and stops when the plug-in with the value &#8220;stop&#8221;. 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.</p>
<pre class="brush: jscript">
s.getTimeToComplete( v, cn, e )
</pre>
<p>v is the Value &#8211; &#8216;start&#8217; or &#8216;stop&#8217;<br />
cn is the Cookie Name – example: &#8216;ttc&#8217;<br />
e is the Expiration &#8211; days to expiration of the cookie, 0 for session<br />
This function will return an empty string &#8221; or a value in days, hours, minutes or seconds</p>
<p>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:</p>
<pre class="brush: jscript">
if (window.location.pathname==&#039;/my-form.php&#039;) s.ttc=&#039;start&#039;;
if (window.location.pathname==&#039;/my-form-thanks.php&#039;) s.ttc=&#039;stop&#039;;
s.prop1=s.getTimeToComplete(s.ttc,&#039;ttc&#039;,0);
</pre>
<p>What this does is looks for the path in the URL for /my-form.php and sets <strong>start</strong> in s.ttc. When the plug-in see&#8217;s this it set&#8217;s the cookie <strong>ttc</strong> with a start time Then when the URL path is /my-form-thanks.php <strong>stop</strong> is set. When the plug-in see&#8217;s <strong>stop</strong>, it then reads the <strong>ttc</strong> 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).</p>
<p><strong>NOTE:</strong>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.</p>
<p>Here is another way to use the code. Let&#8217;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:</p>
<pre class="brush: jscript">
if(s.events.indexOf(&#039;event1&#039;)&gt;-1) s.ttc=&#039;start&#039;;
if(s.events.indexOf(&#039;event2&#039;)&gt;-1) s.ttc=&#039;stop&#039;;
s.prop1=s.getTimeToComplete(s.ttc,&#039;ttc&#039;,0);
</pre>
<p>What this does is look for when event1 happens, then set <strong>start</strong> in s.ttc. When event2 happens <strong>stop</strong> is set, and the time value is set in s.prop1.</p>
<p><strong>NOTE:</strong> 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.</p>
<p>Here is the actual plug-in code:<br />
The getTimeToComplete plug-in returns the time to complete a task. When v is &#8216;start&#8217; a cookie is written with the timestamp. When v is &#8216;stop&#8217; the cookie is read and the expired time is returned in days, hours, minutes, or seconds.</p>
<pre class="brush: jscript">
/*
 * Plugin: getTimeToComplete
 */
s.getTimeToComplete=new Function(&quot;v&quot;,&quot;cn&quot;,&quot;e&quot;,&quot;&quot;
+&quot;var s=this,d=new Date,x=d,k;if(!s.ttcr){e=e?e:0;if(v==&#039;start&#039;||v==&#039;&quot;
+&quot;stop&#039;)s.ttcr=1;x.setTime(x.getTime()+e*86400000);if(v==&#039;start&#039;){s.c&quot;
+&quot;_w(cn,d.getTime(),e?x:0);return &#039;&#039;;}if(v==&#039;stop&#039;){k=s.c_r(cn);if(!s&quot;
+&quot;.c_w(cn,&#039;&#039;,d)||!k)return &#039;&#039;;v=(d.getTime()-k)/1000;var td=86400,th=&quot;
+&quot;3600,tm=60,r=5,u,un;if(v&gt;td){u=td;un=&#039;days&#039;;}else if(v&gt;th){u=th;un=&quot;
+&quot;&#039;hours&#039;;}else if(v&gt;tm){r=2;u=tm;un=&#039;minutes&#039;;}else{r=.2;u=1;un=&#039;sec&quot;
+&quot;onds&#039;;}v=v*r/u;return (Math.round(v)/r)+&#039; &#039;+un;}}return &#039;&#039;;&quot;);
</pre>
<p>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. </p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/additional-methods-to-measure-interaction-using-the-get-time-to-complete-plug-in/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Increase SiteCatalyst Clickmap Functionality with Dynamic Object IDs Plug-in</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/increase-sitecatalyst-clickmap-functionality-with-dynamic-object-ids-plug-in/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/increase-sitecatalyst-clickmap-functionality-with-dynamic-object-ids-plug-in/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 17:58:16 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[coorelation]]></category>
		<category><![CDATA[enhancements]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sitecatalyst]]></category>
		<category><![CDATA[subrelation]]></category>
		<category><![CDATA[URL length]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=254</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>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. </p>
<p>Let&#8217;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.<br />
<img src="http://webanalyticsland.com/images/debugshot.jpg" alt="Dynamic Object ID Plug-in" /></p>
<p>Now what do we get? If you look at the clickmap report, <strong>Site Content>Links>ClickMap</strong>, you will now see a number attached to each URL.<br />
<img src="http://webanalyticsland.com/images/clickmap-report.jpg" alt="Clickmap Report" /><br />
Now you know exactly which link was clicked.</p>
<p>Here is how I have it implemented on this site. Before the <strong>function s_doPlugins(s)</strong>  I include the code:</p>
<pre class="brush: jscript">
/* DynamicObjectIDs config */
function s_getObjectID(o) {
	var ID=o.href;
	return ID;
}
s.getObjectID=s_getObjectID
</pre>
<p>Then within the s_doPlugins(s) function, I include:</p>
<pre class="brush: jscript">
/* To setup Dynamic Object IDs */
s.setupDynamicObjectIDs();
</pre>
<p>And finally in the <strong>Plug-ins section</strong> I have the plug-in code itself.</p>
<pre class="brush: jscript">
/*
 * DynamicObjectIDs
 */
s.setupDynamicObjectIDs=new Function(&quot;&quot;
+&quot;var s=this;if(!s.doi){s.doi=1;if(s.apv&gt;3&amp;&amp;(!s.isie||!s.ismac||s.apv&quot;
+&quot;&gt;=5)){if(s.wd.attachEvent)s.wd.attachEvent(&#039;onload&#039;,s.setOIDs);else&quot;
+&quot; if(s.wd.addEventListener)s.wd.addEventListener(&#039;load&#039;,s.setOIDs,fa&quot;
+&quot;lse);else{s.doiol=s.wd.onload;s.wd.onload=s.setOIDs}}s.wd.s_semapho&quot;
+&quot;re=1}&quot;);
s.setOIDs=new Function(&quot;e&quot;,&quot;&quot;
+&quot;var s=s_c_il[&quot;+s._in+&quot;],b=s.eh(s.wd,&#039;onload&#039;),o=&#039;onclick&#039;,x,l,u,c,i&quot;
+&quot;,a=new Array;if(s.doiol){if(b)s[b]=s.wd[b];s.doiol(e)}if(s.d.links)&quot;
+&quot;{for(i=0;i&lt;s.d.links.length;i++){l=s.d.links[i];c=l[o]?&#039;&#039;+l[o]:&#039;&#039;;b&quot;
+&quot;=s.eh(l,o);z=l[b]?&#039;&#039;+l[b]:&#039;&#039;;u=s.getObjectID(l);if(u&amp;&amp;c.indexOf(&#039;s_&quot;
+&quot;objectID&#039;)&lt;0&amp;&amp;z.indexOf(&#039;s_objectID&#039;)&lt;0){u=s.repl(u,&#039;\&quot;&#039;,&#039;&#039;);u=s.re&quot;
+&quot;pl(u,&#039;\\n&#039;,&#039;&#039;).substring(0,97);l.s_oc=l[o];a[u]=a[u]?a[u]+1:1;x=&#039;&#039;;&quot;
+&quot;if(c.indexOf(&#039;.t(&#039;)&gt;=0||c.indexOf(&#039;.tl(&#039;)&gt;=0||c.indexOf(&#039;s_gs(&#039;)&gt;=0&quot;
+&quot;)x=&#039;var x=\&quot;.tl(\&quot;;&#039;;x+=&#039;s_objectID=\&quot;&#039;+u+&#039;_&#039;+a[u]+&#039;\&quot;;return this.&quot;
+&quot;s_oc?this.s_oc(e):true&#039;;if(s.isns&amp;&amp;s.apv&gt;=5)l.setAttribute(o,x);l[o&quot;
+&quot;]=new Function(&#039;e&#039;,x)}}}s.wd.s_semaphore=0;return true&quot;);
</pre>
<p>To see this code in the s_code file running this site, you can check it out <a href="http://webanalyticsland.com/super-code.php" target="_new" >here</a>.</p>
<p>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? </p>
<p>Recently there was a post on the Omniture blog about <a href="http://blogs.omniture.com/2009/11/24/trimming-the-fat-with-dynamic-variables/" target="_new" >using Dynamic Variables</a>. Using these variables we can now grab the  value of <strong>oid</strong>, which is the click thru URL with the new object id added to it, and you can get the <strong>pid</strong> which is the page the click happened on. I have it set up on this site:</p>
<pre class="brush: jscript">
s.prop20=s.eVar20=&quot;D=oid&quot;;
s.prop22=s.eVar22=&quot;D=pid&quot;;
</pre>
<p>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. </p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/increase-sitecatalyst-clickmap-functionality-with-dynamic-object-ids-plug-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The getCartOpen and resetGetCartOpen SiteCatalyst Plugins</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/the-getcartopen-and-resetgetcartopen-sitecatalyst-plugins/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/the-getcartopen-and-resetgetcartopen-sitecatalyst-plugins/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 03:07:26 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[ecommerce tracking]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[shopping cart]]></category>
		<category><![CDATA[sitecatalyst]]></category>
		<category><![CDATA[s_code.js]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=239</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>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?</p>
<p>What we have here are the <strong>getCartOpen</strong> and <strong>resetGetCartOpen</strong> 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&#8217;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.</p>
<p>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.</p>
<pre class="brush: jscript">
/*Get Cart Open*/
s.events=s.getCartOpen(&quot;s_scOpen&quot;);
</pre>
<p>And here is the getCartOpen plug-in code that should be added to the plug-in code section.</p>
<pre class="brush: jscript">
/*
 * Plugin: getCartOpen
 */
s.getCartOpen=new Function(&quot;c&quot;,&quot;&quot;
+&quot;var s=this,t=new Date,e=s.events?s.events:&#039;&#039;,i=0;t.setTime(t.getTim&quot;
+&quot;e()+1800000);if(s.c_r(c)||e.indexOf(&#039;scOpen&#039;)&gt;-1){if(!s.c_w(c,1,t))&quot;
+&quot;{s.c_w(c,1,0)}}else{if(e.indexOf(&#039;scAdd&#039;)&gt;-1){if(s.c_w(c,1,t)){i=1}&quot;
+&quot;else if(s.c_w(c,1,0)){i=1}}}if(i){e=e+&#039;,scOpen&#039;}return e&quot;);
</pre>
<p>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.</p>
<pre class="brush: jscript">
/*Reset Get Cart Open*/
s.events=s.resetGetCartOpen();
</pre>
<p>And here is the resetGetCartOpen plug-in code that should be added to the plug-in code section.</p>
<pre class="brush: jscript">
/*
 * Plugin: resetGetCartOpen
 */
s.resetGetCartOpen=new Function(&quot;&quot;
+&quot;var s=this,t=new Date,e=s.events?s.events:&#039;&#039;;t.setTime(t.getTime()+&quot;
+&quot;10000);if(e.indexOf(&#039;purchase&#039;)&gt;-1){if(s.c_r(&#039;s_scOpen&#039;)||e.indexOf&quot;
+&quot;(&#039;scOpen&#039;)&gt;-1){if(!s.c_w(&#039;s_scOpen&#039;,&#039;&#039;,t)){s.c_w(&#039;s_scOpen&#039;,&#039;&#039;,0);}&quot;
+&quot;}}return e&quot;);
</pre>
<p>For more information on when to use the scOpen and scAdd events, check out the Omniture Knowledge base Answer ID 440.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/the-getcartopen-and-resetgetcartopen-sitecatalyst-plugins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

