<?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; sitecatalyst</title>
	<atom:link href="http://webanalyticsland.com/sitecatalyst-implementation/tag/sitecatalyst/feed/" rel="self" type="application/rss+xml" />
	<link>http://webanalyticsland.com</link>
	<description>Omniture SiteCatalyst Implementation Optimization.</description>
	<lastBuildDate>Thu, 19 Aug 2010 15:01:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Implement Adobe SiteCatalyst in 5 Minutes (or less!)</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/implement-sitecatalyst-in-5-minutes/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/implement-sitecatalyst-in-5-minutes/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 15:01:26 +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[omniture]]></category>
		<category><![CDATA[sitecatalyst]]></category>
		<category><![CDATA[s_code.js]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=378</guid>
		<description><![CDATA[One of the biggest things I always hear from people considering moving to Adobe SiteCatalyst is the fear of a difficult implementation. It feels to me that most people think they need to implement everything at once, and that is not so. You can just take baby steps and implement small sections at a time. [...]]]></description>
			<content:encoded><![CDATA[<p>One of the biggest things I always hear from people considering moving to Adobe SiteCatalyst is the fear of a difficult implementation. It feels to me that most people think they need to implement everything at once, and that is not so. You can just take baby steps and implement small sections at a time. Let&#8217;s get started with just a standard implementation to get things going. I&#8217;m going to show you how to do a basic implementation of SiteCatalyst in 5 minutes. </p>
<p>First we need to set up a new report suite from the SiteCatalyst Admin Console Report Suite Manager. That can be found by selecting <strong>Admin > Report Suites</strong>.<br />
<img src="http://webanalyticsland.com/images/5min1.gif" alt="Admin Console" /><br />
Once we are in the Report Suite Manager, select <strong>Create New > Report Suite</strong>.<br />
<img src="http://webanalyticsland.com/images/5min2.gif" alt="Create New" /><br />
This will open up the New Report Suite setup page. On this page we have two sections to deal with, the first being where we can choose what type of site we are creating the report suite for. I recommend just leaving this set at the default suite type. Since we plan of adding some neat customizations in the future as our analytics needs increase, the default will work fine for us right now.<br />
<img src="http://webanalyticsland.com/images/5min3.gif" alt="Suite Type" /><br />
Next on this page we have five items that need to be filled in. They are all marked with red stars, with the most important being the first one, Report Suite ID. Why is this the most important? Because it the only one we cannot change later. I recommend it should be something you can easily understand what it means. If your site is apple.com then I would just simply choose <strong>apple</strong> and not something cryptic like <strong>89e7rghv9e7gh</strong> (yes I have seen that done before). It actually doesn&#8217;t matter what you choose (in case you had your heart set on using 89e7rghv9e7gh), anything will work, but choosing something simple may save some headaches in the future. The Site Title is what you want it to be referred to by in the SiteCatalyst interface, Time Zone is your time zone, Go Live Date is when the site is expected to launch (it must be a date in the future), and Estimated Page Views per Day is just what it says. This number is used by the Adobe engineers to determine what resources to dedicate to your site to ensure everything is recorded correctly. Remember any of these items (except Report Suite ID) can be changed later if you need to. There are other things listed here and you can fill them out or change them if you would like, they are not required in setting up the report suite. Fill out the five required fields, click submit and the report suite is created.<br />
<img src="http://webanalyticsland.com/images/5min4.gif" alt="Configure Suite" /><br />
There are some additional things we need to set up before we start with the actual data collection code. Head back to the Report Suite Manager and find you new suite in the list. Click it to highlight it and then mouse over the Edit Settings link. This will bring up a list of additional settings we can adjust. Remember this section. Later when you get more advanced with your SiteCatalyst data collection, this is where you will go to turn on and off variables for more advanced tracking. There are only two items we need to touch right now, and are going to be located under <strong>General</strong>. </p>
<p>Under Internal URL Filters you need to set what the domain of your site is. On every single page view there is a referrer. When your visitors go from your home page to your about us page, the referrer to that page is the home page. You do not want that showing up in your referrer reports, so this is where you list out the domain names that you do not want included in those reports. <strong>Quick tip:</strong> If your site is www.homes.com, and you enter <strong>homes.com</strong> in the URL filter, it will also filter out sites that have that name included in it, for example newhomes.com or cheaphomes.com. Add a period to the front of the domain name to make sure that only your site is filtered, <strong>.homes.com</strong>. You can also enter the subdomain with the URL in the filter if your site only lives at a single subdomain, or you can list all of them in the filter.<br />
<img src="http://webanalyticsland.com/images/5min5.gif" alt="Internal URL FIlter" /></p>
<p>Next you want to hit the Paid Search Detection. In here you need to set up a query sting parameter that will be used for your paid search. Even if you do not plan on doing paid search fill this out any way. It is important in making sure your Search Engine and Search Keywords reports work properly.<br />
<img src="http://webanalyticsland.com/images/5min6.gif" alt="Configure Suite" /></p>
<p>We created our report suite, filled out a handful of variables and we are now ready to start playing with the actual collection code. From the Admin Console Home you can find a direct link to the Code Manager, or you can find it from the navigation menu on the left.<br />
<img src="http://webanalyticsland.com/images/5min7.gif" alt="Admin Console Home" /></p>
<p>In the Code Manger we can generate all types of code for what ever we decide to track. From mobile phone apps to flash video players, all the collection code is here. We just want to generate the simple JavaScript Tracking code. Nothing fancy. Select your report suite, set your character encoding or your currency type and click <strong>Generate Code</strong>. You will get a little pop up warning you to make sure you know what you are doing or the world will end. Just click OK and move on.<br />
<img src="http://webanalyticsland.com/images/5min8.gif" alt="Code Manager" /></p>
<p>Your code is generated now. Take the contents that are under the <strong>Core Javascript File</strong> tab and save them in a file that you name <strong>s_code.js</strong>. Take that file and upload it to your web server where it can be accessed from every page of the site.<br />
<img src="http://webanalyticsland.com/images/5min9.gif" alt="Code Manager" /><br />
 Now take the contents under the <strong>Page Code</strong> tab and paste that to every page of your site, right before the closing body tag. In that code you will see the place marked <strong>INSERT-DOMAIN-AND-PATH-TO-CODE-HERE</strong>. In this position enter the path to the s_code.js file that you previously uploaded. </p>
<p>That&#8217;s all there is to it. This should be easily to be accomplished in 5 minutes or less. We setup the report suite, generated the page code and the s_code and added them to the site. This will give us the basic recording of the site traffic, referrals and visitor information. After this is up and running we can go back and add in some additional elements to the s_code file and the page code to customize your SiteCatalyst implementation to your specific site.</p>
<p>Enjoy!</p>
<img src="http://webanalyticsland.com/?ak_action=api_record_view&id=378&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/implement-sitecatalyst-in-5-minutes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>4 Cool Features of Omniture SiteCatalyst 14.7</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/4-cool-features-of-omniture-sitecatalyst-14-7/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/4-cool-features-of-omniture-sitecatalyst-14-7/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 22:41:33 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[sitecatalyst]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=347</guid>
		<description><![CDATA[Today Omniture released the 14.7 version of their analytics platform SiteCatalyst. While most of the excitement will be over the new Dashboard functionality, here are a 4 other new items that I really like. Trend by day of week The ability to trend by day of week is a really nice addition. When looking at [...]]]></description>
			<content:encoded><![CDATA[<p>Today Omniture released the 14.7 version of their analytics platform SiteCatalyst. While most of the excitement will be over the new Dashboard functionality, here are a 4 other new items that I really like.</p>
<p><strong>Trend by day of week</strong><br />
 The ability to trend by day of week is a really nice addition. When looking at a report if you trend it over time you will see in the report option&#8217;s section a drop down to choose a day. You now have a very easy way to monitor your conversions and custom traffic metrics by any day of the week.<br />
<img src="http://webanalyticsland.com/images/147-c.png" alt="Day of Week" /></p>
<p><strong>New User Welcome Email</strong><br />
When setting up a new user you now have the ability to send them a welcome email. This email can include things like their login information, and who to contact in your organization for support. I have found this to be extremely useful.<br />
<img src="http://webanalyticsland.com/images/147-b.png" alt="Welcome Email" /></p>
<p><strong>New User Default Dashboards</strong><br />
While you are still setting up that new user, you now have the option to set them up with a default dashboard. If your organization already has one created that you would like everyone to use, you can set their account up with it right when you create their login.<br />
<img src="http://webanalyticsland.com/images/147-a.png" alt="Default Dashboards" /></p>
<p><strong>Transfer User Settings</strong><br />
When someone leaves your organization and they have a lot of dashboards and scheduled reports, if you want to keep these items meant having to keep their account around as well. Not anymore. Now you will notice another option to the main user list screen, the ability to Transfer.<br />
<img src="http://webanalyticsland.com/images/147-e.png" alt="Transfer" /><br />
Now before deleting a user account you can transfer all of their dashboards and scheduled reports to another user.<br />
<img src="http://webanalyticsland.com/images/147-d.png" alt="Transfer" /></p>
<p>Other features of the 14.7 release include Percentage Graphs in report tables, alerts on classifications, and the ability to duplicate report suite settings. Oh yeah, and those sexy new dashboards.</p>
<p> <img src='http://webanalyticsland.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Enjoy!</p>
<img src="http://webanalyticsland.com/?ak_action=api_record_view&id=347&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/4-cool-features-of-omniture-sitecatalyst-14-7/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Getting Started With the Omniture PHP Measurement Library</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/omniture-php-measurement-library/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/omniture-php-measurement-library/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 14:34:41 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sitecatalyst]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=317</guid>
		<description><![CDATA[The Omniture PHP Measurement Library lets you use PHP to record your visitor&#8217;s activity on your Web site. At first glance it can look a little intimidating, but it really is not that complicated. Once you have it implemented, all that you will see in the source code of your pages is the image request [...]]]></description>
			<content:encoded><![CDATA[<p>The Omniture PHP Measurement Library lets you use PHP to record your visitor&#8217;s activity on your Web site. At first glance it can look a little intimidating, but it really is not that complicated. Once you have it implemented, all that you will see in the source code of your pages is the image request for the standard Omniture tracking pixel. <a target="_new" href="http://webanalyticsland.com/demo1.php">This is what it looks like implemented</a>. </p>
<p>Here is how to get started with it. From the Code Manager, download the <strong>OmnitureMeasurement.class.php</strong> file and add it to your server in a place so it can be referenced from every page of your site. Next you will need to include the Omniture PHP code on every page of your site.</p>
<p>Here is what a basic version of the PHP page code would look like:</p>
<pre class="brush: php">
&lt;?php
require_once &#039;OmnitureMeasurement.class.php&#039;;
$s = new OmnitureMeasurement();
$s-&gt;account = &#039;ACCOUNT NAME HERE&#039;;
$s-&gt;botDetection = true;

$s-&gt;pageName = &quot;Homepage&quot;;
$s-&gt;server = &quot;Server&quot;;
$s-&gt;channel = &quot;Channel&quot;;

$s-&gt;events = &quot;events&quot;;
$s-&gt;prop1 = &quot;prop1&quot;;
$s-&gt;prop2 = &quot;prop2&quot;;
$s-&gt;eVar1 = &quot;eVar1&quot;;
$s-&gt;eVar2 = &quot;eVar2&quot;;

$s-&gt;currencyCode = &#039;USD&#039;;
$s-&gt;imageDimensions = &#039;5x5&#039;;
$s-&gt;trackingServer = &#039;dominionenterprises.112.2o7.net&#039;;
$s-&gt;sendFromServer = false;
$s-&gt;debugTracking = false;
$s-&gt;track();
?&gt;
</pre>
<p>Lets break it down by section so you will see what is going on here. Here is the first section of the code:</p>
<pre class="brush: php">
&lt;?php
require_once &#039;OmnitureMeasurement.class.php&#039;;
$s = new OmnitureMeasurement();
$s-&gt;account = &#039;ACCOUNT NAME HERE&#039;;
$s-&gt;botDetection = true;
</pre>
<p>The first thing we have here is the call to the Omniture Measurement class <strong>require_once &#8216;OmnitureMeasurement.class.php&#8217;;</strong>. This is what makes the Omniture PHP tracking work. As I said you can download it from the Admin section of SiteCatalyst. That is followed by a line of code that will get the tracking started <strong>$s = new OmnitureMeasurement();</strong>. Next is the place where you enter the report suite id that is associated with the site you plan on tracking. Finally we have a line to detect bots. When this is set to <strong>true</strong>, the Measurement Library detects if the HTTP User-Agent field is a bot, and does not send bot-generated data to Omniture. If this is not included it is set to false by default. If you decide to not include that, then be prepared to see Googlebot show up in your reporting.<br />
<img src="http://webanalyticsland.com/images/user-agent.jpg" alt="Googlebot User Agent" /></p>
<pre class="brush: php">
$s-&gt;pageName = &quot;Homepage&quot;;
$s-&gt;server = &quot;Server&quot;;
$s-&gt;channel = &quot;Channel&quot;;
</pre>
<p>This next section should be pretty self explanatory. This is where I set the pageName, the server, and the channel variables. On my 404 error page this is where I also include the pageType variable, which would look like <strong>$s->pageType=&#8221;errorPage&#8221;;</strong>. </p>
<p><strong>EXTRA:</strong><em> For a lot of my sites I like to use the folder name of the URL as the page name. Here is how you can do that using PHP. I insert this code before the Omniture tracking section:</em></p>
<pre class="brush: php">
&lt;?php
$pNme = parse_url($url, PHP_URL_PATH);
if ($pNme==&quot;/&quot;)$pNme = &quot;Home Page&quot;;
?&gt;
</pre>
<p><em>Then in the measurement library code I include:</em></p>
<pre class="brush: php">
$s-&gt;pageName = $pNme;
</pre>
<p><em>This pulls the file name from the URL and uses that as the page name. I also added a line that looks if all it finds is a slash / then I know they are on the Home Page and use that instead.</em></p>
<pre class="brush: php">
$s-&gt;events = &quot;events&quot;;
$s-&gt;prop1 = &quot;prop1&quot;;
$s-&gt;prop2 = &quot;prop2&quot;;
$s-&gt;eVar1 = &quot;eVar1&quot;;
$s-&gt;eVar2 = &quot;eVar2&quot;;
</pre>
<p>This next section is where we are going to add the Custom Traffic variables, Custom Conversion variables, and Success Events. Again, this section should be pretty straight forward. If you know how to set props and eVars on the page and in the s_code file, you should know what to do here.</p>
<pre class="brush: php">
$s-&gt;currencyCode = &#039;USD&#039;;
$s-&gt;debugTracking = false;
$s-&gt;imageDimensions = &#039;5x5&#039;;
$s-&gt;trackingServer = &#039;112.2o7.net&#039;;
$s-&gt;sendFromServer = false;
$s-&gt;debugTracking = false;
$s-&gt;track();
</pre>
<p>This final section contains some pretty important elements. The first thing you will see is where you declare the Currency Code used for purchases or currency events. You can see I have mine set to US currency, USD. Next I have the call that specifies the width and height of the image request, in pixels. By default, this variable is 1&#215;1. You can see I have mine changed to 5&#215;5 to ensure support for all mobile devices. Next I enter my tracking server info. You should be able to find that in your s_code.js file.</p>
<p>The next two lines are pretty cool. Let&#8217;s say you do not to show any Omniture code on the page. You have the option to not have any thing appear in the source code. When <strong>$s->sendFromServer</strong> is set to true, the Measurement Library makes a direct HTTP request from the server instead of rendering an image tag to the Web browser. If you view the source of the page you will not see anything but the visitor will still be fully tracked. <a target="_new" href="http://webanalyticsland.com/demo2.php">You can see a live example of it here.</a></p>
<p>Without any code on the page it can be difficult to debug the code to make sure everything is being passed in successfully. That&#8217;s where the next variable comes in, <strong>$s->debugTracking</strong>. With this set to false then we do not see anything. If it is set to true then you will see an output on the page of the metrics that are being passed into Omniture. <a target="_new" href="http://webanalyticsland.com/demo3.php">You can see a live example of it here.</a></p>
<p>The problem with that is you either have it off all the time, or you have it on where all of your visitors can see a bunch of code on the page. What I like to do is to add in a little bit of extra code that will only allow the debug code to appear only for me. I do this based off of my ip address. I include this bit of code before the Omniture code:</p>
<pre class="brush: php">
$ip=$_SERVER[&#039;REMOTE_ADDR&#039;];
if ($ip==&quot;xxx.xxx.xx.xxx&quot;) {
	$atHome = true;
} else {
	$atHome = false;
}
</pre>
<p>And then In the Omniture code I have it set as:</p>
<pre class="brush: php">
$s-&gt;debugTracking = $atHome;
</pre>
<p>What this does is allows me to see the variables that are being set every time I visit the site, but none of my visitors have to see it.</p>
<p>The last thing you will see listed in this section is <strong>$s->track();</strong> which is the call to fire off the code. Without this nothing works. This is the equivalent of having the line <strong>var s_code=s.t();if(s_code)document.write(s_code)</strong> in the standard JavaScript tracking. In other words, make sure you include this line.</p>
<p>OK, what else can we do with this? Well as many people know I am a big fan of using plug-ins. Here is one to get you started. One of the more useful ones is the Time Parting plug-in. <a href="http://webanalyticsland.com/sitecatalyst-implementation/time-parting-granularity-using-saint/">As I have written about before</a>, I like combining all of the time variables so I only use a single prop/eVar, so it looks something like <strong>s.prop1=&#8221;thursday|10:00pm&#8221;</strong> and then using a SAINT classification to break it out. How do we replicate this using the PHP Library? Here you go.</p>
<p>Above the Omniture Measurement code I include this:</p>
<pre class="brush: php">
$dayname = date(&#039;l&#039;);
$dayname = strtolower($dayname);
$hourname = date(&#039;g&#039;);
$minname = date(&#039;i&#039;);
$ampmname = date(&#039;a&#039;); 

if ($minname &lt;= &quot;14&quot;) {
	$mintype = &quot;00&quot;;
} else if ($minname &gt;= &quot;15&quot; &amp;&amp; $minname &lt;= &quot;29&quot;){
	$mintype = &quot;15&quot;;
} else if ($minname &gt;= &quot;30&quot; &amp;&amp; $minname &lt;= &quot;44&quot;){
	$mintype = &quot;30&quot;;
} else if ($minname &gt;= &quot;45&quot; &amp;&amp; $minname &lt;= &quot;59&quot;){
	$mintype = &quot;45&quot;;
}
$fulldayparting = &quot;$dayname|$hourname:$mintype$ampmname&quot;;
</pre>
<p>Then in one of the available props in the code I have:</p>
<pre class="brush: php">
$s-&gt;prop16 = $fulldayparting;
</pre>
<p>This returns something like <strong>thursday|10:00pm</strong>, exactly like the Javascript plug-in does. I also like to copy this same value to an eVar, but I only want to do it once per visit. I like using the eVar for when the visit started, and the prop for every page view. Here is how I get that same value recorded only once per visit. </p>
<p>At the top of all my &#8216;extra&#8217; code that I have included before the Omniture measurement code, I include this:</p>
<pre class="brush: php">
$sesionnumber = $_SESSION[&#039;count&#039;];
if ($sesionnumber == &#039;1&#039;) {
     $fulldaypartingsession = $fulldayparting;
} else {
     $fulldaypartingsession = &#039;&#039;;
}
</pre>
<p>And then with the available eVars I include:</p>
<pre class="brush: php">
$s-&gt;eVar16 = $fulldaypartingsession;
</pre>
<p>What this does is on the first page of the session it will set the Time Parting value, but will just leave it blank for the rest of the session giving you a good session start time.</p>
<p>Hopefully this is enough to get you started. There are a lot of other cool PHP tricks that will allow you to replicate most of the functions of the Javascript tracking. Make sure you download and read the <strong>PHP Measurement Library Implementation Guide</strong> from the Omniture Help Section for additional details. </p>
<p>Enjoy!</p>
<img src="http://webanalyticsland.com/?ak_action=api_record_view&id=317&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/omniture-php-measurement-library/feed/</wfw:commentRss>
		<slash:comments>3</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 [...]]]></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>
<img src="http://webanalyticsland.com/?ak_action=api_record_view&id=320&type=feed" alt="" />]]></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 [...]]]></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>
<img src="http://webanalyticsland.com/?ak_action=api_record_view&id=314&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/sitecatalyst-utility-functions/feed/</wfw:commentRss>
		<slash:comments>2</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>
<img src="http://webanalyticsland.com/?ak_action=api_record_view&id=284&type=feed" alt="" />]]></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 [...]]]></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>
<img src="http://webanalyticsland.com/?ak_action=api_record_view&id=254&type=feed" alt="" />]]></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. [...]]]></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>
<img src="http://webanalyticsland.com/?ak_action=api_record_view&id=239&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/the-getcartopen-and-resetgetcartopen-sitecatalyst-plugins/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Detect Silverlight and Flash with SiteCatalyst Plugin</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/detect-silverlight-and-flash-with-sitecatalyst-plugin/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/detect-silverlight-and-flash-with-sitecatalyst-plugin/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 04:03:41 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[sitecatalyst]]></category>
		<category><![CDATA[s_code.js]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=232</guid>
		<description><![CDATA[Tracking your visitor&#8217;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 [...]]]></description>
			<content:encoded><![CDATA[<p>Tracking your visitor&#8217;s Flash version is nothing new. I wrote about it a while ago in the <a href="http://webanalyticsland.com/sitecatalyst-implementation/plugin-to-detect-flash-in-sitecatalyst/">Plugin To Detect Flash in SiteCatalyst</a> post. What I have here is a little more powerful. This is the Rich Internet Application tracking plug-in. </p>
<p>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.</p>
<p>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:</p>
<pre class="brush: jscript">
s.detectRIA(&#039;s_ria&#039;,&#039;prop10&#039;,&#039;prop11&#039;);
</pre>
<p>Then in the plug-in&#8217;s section add the plug-in code:</p>
<pre class="brush: jscript">
/*
 * Plugin: detectRIA v0.1 - detect and set Flash, Silverlight versions
 */
s.detectRIA=new Function(&quot;cn&quot;, &quot;fp&quot;, &quot;sp&quot;, &quot;mfv&quot;, &quot;msv&quot;, &quot;sf&quot;, &quot;&quot;
+&quot;cn=cn?cn:&#039;s_ria&#039;;msv=msv?msv:2;mfv=mfv?mfv:10;var s=this,sv=&#039;&#039;,fv=-&quot;
+&quot;1,dwi=0,fr=&#039;&#039;,sr=&#039;&#039;,w,mt=s.n.mimeTypes,uk=s.c_r(cn),k=s.c_w(&#039;s_cc&#039;,&quot;
+&quot;&#039;true&#039;,0)?&#039;Y&#039;:&#039;N&#039;;fk=uk.substring(0,uk.indexOf(&#039;|&#039;));sk=uk.substrin&quot;
+&quot;g(uk.indexOf(&#039;|&#039;)+1,uk.length);if(k==&#039;Y&#039;&amp;&amp;s.p_fo(&#039;detectRIA&#039;)){if(u&quot;
+&quot;k&amp;&amp;!sf){if(fp){s[fp]=fk;}if(sp){s[sp]=sk;}return false;}if(!fk&amp;&amp;fp)&quot;
+&quot;{if(s.pl&amp;&amp;s.pl.length){if(s.pl[&#039;Shockwave Flash 2.0&#039;])fv=2;x=s.pl[&#039;&quot;
+&quot;Shockwave Flash&#039;];if(x){fv=0;z=x.description;if(z)fv=z.substring(16&quot;
+&quot;,z.indexOf(&#039;.&#039;));}}else if(navigator.plugins&amp;&amp;navigator.plugins.len&quot;
+&quot;gth){x=navigator.plugins[&#039;Shockwave Flash&#039;];if(x){fv=0;z=x.descript&quot;
+&quot;ion;if(z)fv=z.substring(16,z.indexOf(&#039;.&#039;));}}else if(mt&amp;&amp;mt.length)&quot;
+&quot;{x=mt[&#039;application/x-shockwave-flash&#039;];if(x&amp;&amp;x.enabledPlugin)fv=0;}&quot;
+&quot;if(fv&lt;=0)dwi=1;w=s.u.indexOf(&#039;Win&#039;)!=-1?1:0;if(dwi&amp;&amp;s.isie&amp;&amp;w&amp;&amp;exec&quot;
+&quot;Script){result=false;for(var i=mfv;i&gt;=3&amp;&amp;result!=true;i--){execScri&quot;
+&quot;pt(&#039;on error resume next: result = IsObject(CreateObject(\&quot;Shockwav&quot;
+&quot;eFlash.ShockwaveFlash.&#039;+i+&#039;\&quot;))&#039;,&#039;VBScript&#039;);fv=i;}}fr=fv==-1?&#039;flas&quot;
+&quot;h not detected&#039;:fv==0?&#039;flash enabled (no version)&#039;:&#039;flash &#039;+fv;}if(&quot;
+&quot;!sk&amp;&amp;sp&amp;&amp;s.apv&gt;=4.1){var tc=&#039;try{x=new ActiveXObject(\&quot;AgControl.A&#039;&quot;
+&quot;+&#039;gControl\&quot;);for(var i=msv;i&gt;0;i--){for(var j=9;j&gt;=0;j--){if(x.is&#039;&quot;
+&quot;+&#039;VersionSupported(i+\&quot;.\&quot;+j)){sv=i+\&quot;.\&quot;+j;break;}}if(sv){break;}&#039;&quot;
+&quot;+&#039;}}catch(e){try{x=navigator.plugins[\&quot;Silverlight Plug-In\&quot;];sv=x&#039;&quot;
+&quot;+&#039;.description.substring(0,x.description.indexOf(\&quot;.\&quot;)+2);}catch(&#039;&quot;
+&quot;+&#039;e){}}&#039;;eval(tc);sr=sv==&#039;&#039;?&#039;silverlight not detected&#039;:&#039;silverlight&quot;
+&quot; &#039;+sv;}if((fr&amp;&amp;fp)||(sr&amp;&amp;sp)){s.c_w(cn,fr+&#039;|&#039;+sr,0);if(fr)s[fp]=fr;&quot;
+&quot;if(sr)s[sp]=sr;}}&quot;);
s.p_fo=new Function(&quot;n&quot;,&quot;&quot;
+&quot;var s=this;if(!s.__fo){s.__fo=new Object;}if(!s.__fo[n]){s.__fo[n]=&quot;
+&quot;new Object;return 1;}else {return 0;}&quot;);
</pre>
<p>&#8220;We are considering developing some Silverlight applications. What percentage of our visitors have Silverlight, and if so what version?&#8221; Now you will have no problems answering that question.</p>
<p>If you would like more information about using SiteCatalyst with Silverlight, check out the white paper <em>Using SiteCatalyst and Silverlight</em>, available in the Omniture Knowledge Base.</p>
<p>Enjoy!</p>
<img src="http://webanalyticsland.com/?ak_action=api_record_view&id=232&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/detect-silverlight-and-flash-with-sitecatalyst-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Add Page Views And Visits To All SiteCatalyst eVars</title>
		<link>http://webanalyticsland.com/sitecatalyst-implementation/how-to-add-page-views-and-visits-to-all-sitecatalyst-evars/</link>
		<comments>http://webanalyticsland.com/sitecatalyst-implementation/how-to-add-page-views-and-visits-to-all-sitecatalyst-evars/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 19:39:14 +0000</pubDate>
		<dc:creator>VaBeachKevin</dc:creator>
				<category><![CDATA[SiteCatalyst Implementation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[enhancements]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[page views]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sitecatalyst]]></category>
		<category><![CDATA[s_code.js]]></category>
		<category><![CDATA[tracking]]></category>
		<category><![CDATA[visits]]></category>

		<guid isPermaLink="false">http://webanalyticsland.com/?p=218</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a simple way to add Page Views and <strike>Visits</strike> to all of your eVar reports <strong>(see the update below)</strong>. 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&#8217;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 <a href="http://webanalyticsland.com/sitecatalyst-plugins/">SiteCatalyst Plugins</a> page. Here&#8217;s how to do it. </p>
<p>First lets get Page Views. To do this we are going to use the <a href="http://webanalyticsland.com/plugins/Append_to_List_Plugin.pdf">Append List plug-in</a>. 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&#8217;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.</p>
<pre class="brush: jscript">
s.apl(L,v,d,u)
</pre>
<p>L = source list, empty list is accepted<br />
v = value to append<br />
d = list delimiter<br />
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&#8217;t in list. 2=case sensitive check, append only if value isn&#8217;t in list.</p>
<p>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.</p>
<pre class="brush: jscript">
/* Set Page View Event */
s.events=s.apl(s.events,&#039;event1&#039;,&#039;,&#039;,1);
</pre>
<p>Here is the plug-in code:</p>
<pre class="brush: jscript">
/*
* Plugin Utility: apl v1.1
*/
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;);
</pre>
<p><strong><font color="red">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 &#8220;None&#8221; 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!</font></strong></p>
<p><strong><font color="red">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.</font></strong></p>
<p>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.</p>
<p>What the <a href="http://webanalyticsland.com/plugins/Get_Visit_Start_Plugin.pdf">Get Visit Start plug-in</a> 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&#8217;t be set, so it functions very much like the standard Visit&#8217;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. </p>
<pre class="brush: jscript">
s.getVisitStart(c)
</pre>
<p>c=cookie name for tracking (&#8220;s_visit&#8221; is standard)</p>
<p>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.</p>
<pre class="brush: jscript">
/* Set Visit Event */
s.visEvent=s.getVisitStart(&quot;s_visit&quot;);
if (s.visEvent) s.events=s.apl(s.events,&#039;event6&#039;,&#039;,&#039;,1);
</pre>
<p>Here is the plug-in code:</p>
<pre class="brush: jscript">
/*
 * Get Visit Start
 */
s.getVisitStart=new Function(&quot;c&quot;,&quot;&quot;
+&quot;var s=this,v=1,t=new Date;t.setTime(t.getTime()+1800000);if(s.c_r(c&quot;
+&quot;)){v=0}if(!s.c_w(c,1,t)){s.c_w(c,1,0)}if(!s.c_r(c)){v=0}return v;&quot;);
</pre>
<p>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&#8217;t want to work well with the s.events variable.</p>
<p>Enjoy!</p>
<img src="http://webanalyticsland.com/?ak_action=api_record_view&id=218&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://webanalyticsland.com/sitecatalyst-implementation/how-to-add-page-views-and-visits-to-all-sitecatalyst-evars/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
