<?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>Rudi Shumpert : Code By Numbers &#187; Code Snipets</title> <atom:link href="http://www.rudishumpert.com/category/code-snipets/feed/" rel="self" type="application/rss+xml" /><link>http://www.rudishumpert.com</link> <description>Adventures in web development and analytics</description> <lastBuildDate>Wed, 08 Sep 2010 00:13:53 +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>Share This Page &#8211; On Your Terms!</title><link>http://www.rudishumpert.com/2010/07/21/share-this-page-on-your-terms/</link> <comments>http://www.rudishumpert.com/2010/07/21/share-this-page-on-your-terms/#comments</comments> <pubDate>Wed, 21 Jul 2010 12:16:00 +0000</pubDate> <dc:creator>Rudi</dc:creator> <category><![CDATA[Code Snipets]]></category> <category><![CDATA[ColdFusion]]></category> <category><![CDATA[Data Collection]]></category> <category><![CDATA[Omniture]]></category> <category><![CDATA[Practical Analytics]]></category> <category><![CDATA[Web Analytics]]></category> <category><![CDATA[Share This Page]]></category> <category><![CDATA[Social Media]]></category><guid
isPermaLink="false">http://www.rudishumpert.com/?p=621</guid> <description><![CDATA[Build your own "Share this page" feature! Not too long ago I added one of the "Share this page" scripts, AddToAny, to our web site.  This seemed like it was going to work fine but this approach had 3 major drawbacks. Most of these services require you to link to their JavaScript file on their [...]]]></description> <content:encoded><![CDATA[<p>Build your own "Share this page" feature!</p><p>Not too long ago I added one of the "Share this page" scripts, AddToAny, to our web site.  This seemed like it was going to work fine but this approach had 3 major drawbacks.</p><ol><li> Most of these services require you to link to their JavaScript file on their servers.  Sure this is fairly reliable but I am not a fan of this approach.</li><li>Limited tracking / analytic capabilities.</li><li>Cookies you can not control.</li></ol><p>The first two issues are not huge issues, but while we were testing the site, we noticed that the scripts were adding a few of their own cookies to our users.  I understand why this is, but I did not like it and the feature was pulled.  So I tested out another one, Share This, and it did the same thing. Not only do they add cookies to your users, but they are also tracking usage of their tool on your site.  I don't blame them for this, after all they are providing this as a free service but I still do not like it.</p><p>After looking at the scripts for a while I decided that it could not be that difficult to write my own "Share this page" feature.</p><p>My goal was to create a widget to let users share the current web page without the limitations listed above.  With just a wee bit of research I found the methods needed to be able to share a page via email, Twitter, Facebook, and LinkedIn.  And then track the usage of data in Omniture SiteCatalyst.</p><pre class="brush: plain;">
&lt;ul&gt;
  &lt;li&gt;&lt;A onClick=&quot;jsFunctionToRecordClick('Email');&quot; HREF=&quot;mailto:?subject=#variables.emailSubject#&amp;body=#variables.emailMessage#&quot;&gt;Email &lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a onClick=&quot;jsFunctionToRecordClick('Twitter');&quot; href=&quot;http://twitter.com/home?status=#variables.twitterLink#&quot; target=&quot;_blank&quot;&gt;Twitter &lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a onClick=&quot;jsFunctionToRecordClick('LinkedIn');&quot; href=&quot;http://www.linkedin.com/shareArticle?mini=true&amp;url=www.rudishumpert.com&amp;title=AmazingArticle&amp;summary=This is the best ever&amp;source=Rudi&quot;  target=&quot;_blank&quot;&gt;LinkedIn &lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a onClick=&quot;jsFunctionToRecordClick('Facebook');&quot; href=&quot;http://www.facebook.com/share.php?src=bm&amp;u=#variables.currentPage#&amp;t=#variables.twitterLink#&amp;v=3&quot; target=&quot;_blank&quot;&gt;Facebook &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre><p>Sample links without the tracking added:</p><ul><li><a
onclick="jsFunctionToRecordClick('Email');" href="mailto:?subject=Check this out!&amp;body=Message with Link Goes Here: http://www.rudishumpert.com">Email </a></li><li><a
onclick="jsFunctionToRecordClick('Twitter');" href="http://twitter.com/home?status=Share%20This%20urlhere%20Build%20your%20own!%20measure" target="_blank">Twitter </a></li><li><a
onclick="jsFunctionToRecordClick('LinkedIn');" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=www.rudishumpert.com&amp;title=AmazingArticle&amp;summary=This is the best ever&amp;source=Rudi" target="_blank">LinkedIn </a></li><li><a
onclick="jsFunctionToRecordClick('Facebook');" href="http://www.facebook.com/share.php?src=bm&amp;u=www.rudishumpert.com&amp;t=Share This: http://wp.me/pCbAx-a1 Build your own!&amp;v=3" target="_blank">Facebook </a></li></ul><p>And then the JS Function: Note the JS function is specific to Omniture tracking but this could be leverage for any analytic solution with some minor tweaking.</p><pre class="brush: plain;">
			function jsFunctionToRecordClick(category){
				var s = s_gi(s_account);
				s.linkTrackVars=&quot;events,eVarN,propN,propN&quot;;
				s.linkTrackEvents=&quot;eventN&quot;;
				s.events=&quot;eventN&quot;;
				s.eVarN=''+category+'';
				s.propN=''+category+'';
				s.propN=''+category+' | '+s.pageName+'';
				s.tl();
				s.events=&quot;&quot;;
				s.linkTrackEvents=&quot;&quot;;
				s.linkTrackVars=&quot;&quot;;
				s.eVarN='';
				s.propN='';
				s.propN='';
			}
</pre><p>The feature is added to the page using a jQuery menu script that creates the same mouse-over drop down effect that the free scripts use, but you can use any sort of presentation approach that fits your web site's style.</p><p>And that is it.  You know have your own custom share this web page feature that your can style however you like and maintain complete control over what cookies are used on your site and what level of tracking you would like to get out of the widget.</p><p><a
href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F07%2F21%2Fshare-this-page-on-your-terms%2F&amp;linkname=Share%20This%20Page%20%26%238211%3B%20On%20Your%20Terms%21" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a
href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F07%2F21%2Fshare-this-page-on-your-terms%2F&amp;linkname=Share%20This%20Page%20%26%238211%3B%20On%20Your%20Terms%21" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a
href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F07%2F21%2Fshare-this-page-on-your-terms%2F&amp;linkname=Share%20This%20Page%20%26%238211%3B%20On%20Your%20Terms%21" title="Delicious" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a
href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F07%2F21%2Fshare-this-page-on-your-terms%2F&amp;linkname=Share%20This%20Page%20%26%238211%3B%20On%20Your%20Terms%21" title="Facebook" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a
class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://www.rudishumpert.com/2010/07/21/share-this-page-on-your-terms/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Creating static URL&#8217;s from dynamic pages for Eloqua</title><link>http://www.rudishumpert.com/2010/07/14/creating-static-urls-for-eloqua/</link> <comments>http://www.rudishumpert.com/2010/07/14/creating-static-urls-for-eloqua/#comments</comments> <pubDate>Wed, 14 Jul 2010 17:48:09 +0000</pubDate> <dc:creator>Rudi</dc:creator> <category><![CDATA[Code Snipets]]></category> <category><![CDATA[ColdFusion]]></category> <category><![CDATA[Data Collection]]></category> <category><![CDATA[Web Analytics]]></category> <category><![CDATA[Eloqua]]></category> <category><![CDATA[Marketing Automation Implementation]]></category><guid
isPermaLink="false">http://www.rudishumpert.com/?p=615</guid> <description><![CDATA[Sometimes the code... it mocks me. This was the case when working with the implementation scripts from Eloqua. I followed the instructions and by default about 98% of the tracking we needed was being accomplished. The issue I encountered was trying to get Eloqua to differentiate the content being served up on a dynamic page. [...]]]></description> <content:encoded><![CDATA[<p>Sometimes the code... it mocks me.  This was the case when working with the implementation scripts from Eloqua.  I followed the instructions and by default about 98% of the tracking we needed was being accomplished.  The issue I encountered was trying to get Eloqua to differentiate the content being served up on a dynamic page.</p><p>One url.  page.cfm?urlVariable=1 , page.cfm?urlVariable=2, page.cfm?urlVariable=3.  They all showed up as page.cfm in the reports.  And while Eloqua does have features that allow you to set up a query string in the admin console, you have to assign each value ahead of time and from what I have been told by folks both inside and outside of Eloqua, you are not able to use those values for certain types of behavioral tracking and filtering.</p><blockquote><p>NOTE:  I claim little knowledge of the inner workings of Eloqua and have had to take the word of the support folks and the documentation I could find.  If you know this to be different, I would love to hear from you.</p></blockquote><p>After much time spent scouring the web I found this article on an Eloqua blog.<br
/> <a
href="http://eloqua.blogspot.com/2010/05/fun-with-eloqua-and-jquery-tracking-pdf.html" target="_blank">http://eloqua.blogspot.com/2010/05/fun-with-eloqua-and-jquery-tracking-pdf.html</a></p><p>The author of this blog, used a secondary tracking script from Eloqua ( elqFCS.js) and leveraged this and jQuery to auto tag links to any pdf on the sample site.  Seeing this approach I was pretty sure I could use this method to meet my goal.</p><p>Step 1:  Add the link to the additional JS file.  It should be part of the standard implementation scripts.</p><pre class="brush: plain;">
 &lt;SCRIPT TYPE='text/javascript' SRC='/elqNow/elqFCS.js'&gt;&lt;/SCRIPT&gt;
 </pre><p>Step 2: Check for the dynamic page, and if found create a "static" url to send to Eloqua.</p><pre class="brush: plain;">
 &lt;cfparam name=&quot;url.urlVariable&quot; default=&quot;&quot;&gt;
&lt;cfif cgi.path_info EQ &quot;/dynamicPageInQuestion.cfm&quot; and LEN(url.urlVariable) GT 0&gt;
	&lt;script&gt;
		$(document).ready(function(){
			var fullurl = '&lt;cfoutput&gt;http://www.yoursite.com/NameOfYourChoosing/#url.urlVariable#&lt;/cfoutput&gt;';
			elqFCS(fullurl);
	 	});
	&lt;/script&gt;
&lt;/cfif&gt;
</pre><p>That's it!  Now inside of Eloqua in addtion to seeing a visit to  /dynamicPageInQuestion.cfm you will also see</p><p>http://www.yoursite.com/NameOfYourChoosing/1</p><p>http://www.yoursite.com/NameOfYourChoosing/2</p><p>http://www.yoursite.com/NameOfYourChoosing/3  etc or whatever value you need to be able to filter on.</p><p>As of now, this is working and meets the goal / need I had.  I'm curious if others have dealt with this, and if so what solutions did they come up with.</p><p><a
href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F07%2F14%2Fcreating-static-urls-for-eloqua%2F&amp;linkname=Creating%20static%20URL%26%238217%3Bs%20from%20dynamic%20pages%20for%20Eloqua" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a
href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F07%2F14%2Fcreating-static-urls-for-eloqua%2F&amp;linkname=Creating%20static%20URL%26%238217%3Bs%20from%20dynamic%20pages%20for%20Eloqua" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a
href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F07%2F14%2Fcreating-static-urls-for-eloqua%2F&amp;linkname=Creating%20static%20URL%26%238217%3Bs%20from%20dynamic%20pages%20for%20Eloqua" title="Delicious" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a
href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F07%2F14%2Fcreating-static-urls-for-eloqua%2F&amp;linkname=Creating%20static%20URL%26%238217%3Bs%20from%20dynamic%20pages%20for%20Eloqua" title="Facebook" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a
class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://www.rudishumpert.com/2010/07/14/creating-static-urls-for-eloqua/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Omniture &#8211; SalesForce Integration: Take 2</title><link>http://www.rudishumpert.com/2010/05/18/omniture-salesforce-integration-a-different-spin/</link> <comments>http://www.rudishumpert.com/2010/05/18/omniture-salesforce-integration-a-different-spin/#comments</comments> <pubDate>Tue, 18 May 2010 12:48:10 +0000</pubDate> <dc:creator>Rudi</dc:creator> <category><![CDATA[Code Snipets]]></category> <category><![CDATA[ColdFusion]]></category> <category><![CDATA[Data Collection]]></category> <category><![CDATA[Omniture]]></category> <category><![CDATA[Web Analytics]]></category> <category><![CDATA[SalesForce]]></category><guid
isPermaLink="false">http://www.rudishumpert.com/?p=585</guid> <description><![CDATA[In the beginner’s mind there are many possibilities. The developer side of my brain refuses to believe that there is only one way to do things, so after spending a great deal of time and effort to integrate SalesForce data into Omniture using the standard Genesis integration I felt that there had to be another [...]]]></description> <content:encoded><![CDATA[<p><strong>In the beginner’s mind there are many possibilities.</strong></p><p>The developer side of my brain refuses to believe that there is only one way to do things, so after spending a great deal of time and effort to integrate SalesForce data into Omniture using the standard Genesis integration I felt that there had to be another way.  If you have not read the recent posts by Adam Greco on getting <a
href="http://www.the-omni-man.com/sitecatalyst/adamgreco/2010/05/17/crm-integration-2-passing-crm-data-to-web-analytics/" target="_blank">CRM data into Omniture</a>, stop reading this post and go read those first.  Then come back!</p><p>What I needed to do was find a way to get a few data points out of SalesForce and into Omniture SiteCatalyst.  The solution also needed to be automated so that it could run every 3-4 hours.  After thinking over the topics discussed is Adam's blog post I had a plan.</p><p><strong>The Challenge:</strong></p><p>State over time.  That is what this whole exercise comes down to.  How to get Omniture SiteCatalyst to store and measure the state of a data point over a set time.  These data points are up to you and your specific business needs.  Some examples are revenue, leads, etc..</p><p>The granular level of data you can/want to pull over is limited only by your your business objectives.  For the purpose of this post, I will only be talking about getting data at a campaign level.</p><p><strong>The Setup:</strong></p><p>Transaction ID's and a matching key in SalesForce.  If you can, I strongly recommend using the SalesForce campaign id's as your web analytics campaign ID's.  It give you a great 1:1 data point between the two systems.  It also makes it easy to use that campaign ID as your transaction ID.</p><p>Incrementor Events.  (2 for every data point in SalesForce that you want to integrate)  These are needed to accomplish the heavy lifting of the state over time.   If you want to track revenue attributed to a specific campaign for example, you create 2 events.  One revenue_positive event, and one revenue_negative event.   Later you will create a calculated metric to get the delta of these two events to get the actual number.</p><p>State Manager.  You have to have some mechanism to get the data out of SalesForce and then be able to determine the difference in the value of the data points you want to integrate into Omniture.  There are numerous ways that you could accomplish this, but I chose to write a custom ColdFusion / SQL solution.</p><p
style="text-align: center;"><a
href="http://www.rudishumpert.com/wp-content/uploads/2010/05/Omniture-SalesForce-Plan-1.png"><img
class="size-full wp-image-587 aligncenter" title="Omniture-SalesForce Plan" src="http://www.rudishumpert.com/wp-content/uploads/2010/05/Omniture-SalesForce-Plan-1.png" alt="" width="677" height="538" /></a></p><p>The flow chart above shows at a high level all of the steps in the process.</p><p>1) Pull a list of transaction ids/ campaign ids from Omniture and store that list in a new db table.</p><p>2) Loop over that table and query SalesForce to get the data points you want to move, and store that in a second database table.</p><p>3) The very first time you run this process you are creating the state.  This copies the data into the third state database table.  Each time after that, you compare the values in the 3rd table with the data in the 2nd table.   This drives the values you pass into the incrementor events.   If the first time you pull data from SalesForce to find the revenue for a campaign is $100.00 that gets stored in the third table.  You pass 100 to the revenue_positive and 0 to the revenue_negative.  The next data pull the revenue is now 110.  After the comparison, you pass a 10 to the revenue_positive and 0 to the revenue_negative.  Now on a future data pull, you find the revenue is down to 50.  You now send a 0 in the revenue_positive and a 60 to the revenue_negative events.   When you create the calculated metric you will see the new value of 50 for that calculated metric.</p><pre class="brush: plain;">
&lt;cfset variables.revenuewon_str=&quot;#variables.revenue_pos_event#=0|#variables.revenue_neg_event#=0&quot;&gt;
&lt;cfif variables.DIF_revenuewon EQ 0&gt;
	&lt;cfset variables.revenuewon_str=&quot;#variables.revenue_pos_event#=0|#variables.revenue_neg_event#=0&quot;&gt;
&lt;cfelseif variables.DIF_revenuewon GT 0&gt;
	&lt;cfset variables.revenuewon_str=&quot;#variables.revenue_pos_event#=#variables.DIF_revenuewon#|#variables.revenue_neg_event#=0&quot;&gt;
&lt;cfelse&gt;
	&lt;cfset variables.revenuewon_str=&quot;#variables.revenue_pos_event#=0|#variables.revenue_neg_event#=#ABS(variables.DIF_revenuewon)#&quot;&gt;
&lt;/cfif&gt;
</pre><p>The code sample above evaluates the difference in the data point between tables 2 and 3 and generates the string required to send the data to Omniture.</p><p>4) Push the data to Omniture.  After you create the txt file with the transaction id and the values for the events, set up an automatic ftp using the <a
href="http://blogs.omniture.com/2009/01/25/data-sources-inside-omniture-sitecatalyst/" target="_blank">Omniture DataSources</a>.</p><p>5) Automate.  Since the controlling code to power this process was ColdFusion, all that was required was to set up a scheduled task within the ColdFusion admin and done!</p><p><strong>The Result:</strong></p><div
id="attachment_593" class="wp-caption aligncenter" style="width: 529px"><a
href="http://www.rudishumpert.com/wp-content/uploads/2010/05/sf.png"><img
class="size-full wp-image-593" title="sf" src="http://www.rudishumpert.com/wp-content/uploads/2010/05/sf.png" alt="" width="519" height="156" /></a><p
class="wp-caption-text">My Photoshop-fu is weak.</p></div><p
style="text-align: left;">Now, right inside of SiteCatalyst, you can see SalesForce data points that matter to you in your reports.  Of course, the data will look much cleaner that my mocked up image...hopefully.</p><p
style="text-align: left;"><p
style="text-align: left;"><p><a
href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F05%2F18%2Fomniture-salesforce-integration-a-different-spin%2F&amp;linkname=Omniture%20%26%238211%3B%20SalesForce%20Integration%3A%20Take%202" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a
href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F05%2F18%2Fomniture-salesforce-integration-a-different-spin%2F&amp;linkname=Omniture%20%26%238211%3B%20SalesForce%20Integration%3A%20Take%202" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a
href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F05%2F18%2Fomniture-salesforce-integration-a-different-spin%2F&amp;linkname=Omniture%20%26%238211%3B%20SalesForce%20Integration%3A%20Take%202" title="Delicious" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a
href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F05%2F18%2Fomniture-salesforce-integration-a-different-spin%2F&amp;linkname=Omniture%20%26%238211%3B%20SalesForce%20Integration%3A%20Take%202" title="Facebook" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a
class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://www.rudishumpert.com/2010/05/18/omniture-salesforce-integration-a-different-spin/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Jive + Omniture + Automation = Happiness</title><link>http://www.rudishumpert.com/2010/04/05/jive-omniture-automation-happiness/</link> <comments>http://www.rudishumpert.com/2010/04/05/jive-omniture-automation-happiness/#comments</comments> <pubDate>Mon, 05 Apr 2010 19:15:25 +0000</pubDate> <dc:creator>Rudi</dc:creator> <category><![CDATA[Code Snipets]]></category> <category><![CDATA[ColdFusion]]></category> <category><![CDATA[Data Collection]]></category> <category><![CDATA[Omniture]]></category> <category><![CDATA[Web Analytics]]></category> <category><![CDATA[Jive Software]]></category><guid
isPermaLink="false">http://www.rudishumpert.com/?p=534</guid> <description><![CDATA[I am a true believer in automation, so the last thing I want to do is create a process or work flow that I or someone else has to baby sit.   When I began working on a project to see what type of data I could get from Jive, an online community application, and into Ominture I wanted [...]]]></description> <content:encoded><![CDATA[<p>I am a true believer in automation, so the last thing I want to do is create a process or work flow that I or someone else has to baby sit.   When I began working on a project to see what type of data I could get from <a
href="http://www.jivesoftware.com/" target="_blank">Jive</a>, an online community application, and into Ominture I wanted to make sure that the solution could be automated.</p><p>Before we get into it, there is a key point I want to make about the data.  The data base that you get from Jive is not your typical clickstream data set.  It is an activity database.  You will not get pagenames, or visitor session information.  What you will get is an activity logged for everything a users does on the community site.  Views/creates/modifies  a thread, blog post, question, poll, etc..   If the user is logged in, you get their user id, name, etc..  <em><strong> If the user is not logged in, they all show up as a single user.</strong></em> Even with this limitation, there is still plenty of useful data to be found.</p><p><span
id="more-534"></span></p><p><strong>Configuration requirements/prerequisites: </strong>While the end solution is fully automated, there is a fair amount of  configuration that most be completed.</p><p><strong>ColdFusion Server: </strong> The main controlling files are cfm pages that are called via the CFAdmin / Scheduled tasks.  This process could be accomplished using your scripting/coding language of choice.</p><p><strong><a
href="http://www.postgresql.org/" target="_blank">PostgreSQL:</a></strong> The<strong> </strong>.dmp file that Jive provides is in the PostgreSQL format.  This is a free/open source database solution.  I found that the built in admin works ok for setting up the database and user to be used for the scripts, and for creating any views to assist with the ETL process, but is severely lacking in terms of exporting capabilities.</p><ul><li>Create 2 views to pre-process the data for extract<ul><li>Known Users</li><li>Unknown users / guests</li><li>Define headers of views to align to Omniture - Data Source file requirements.</li></ul></li></ul><p><a
href="http://www.sql-workbench.net/" target="_blank"><strong>SQL WorkBench</strong> </a>:  A free / open source db admin tool with exceptional data export features which are all accessible via the command line interface.  Once you install the tool, you will need to create a connection profile to be used in all scripts.</p><ul><li>Create SQL queries to perform data extract</li><li>Need 1 .sql file for each query<ul><li>creates .txt file with data ready to ftp</li><li>creates matching .fin file to ftp</li></ul></li></ul><p><strong>Command line / batch file access: </strong> While most of the controlling files are ColdFusion pages, the files that perform the restore and data extraction are batch files.  It is up to you to use the format of calling these batch files that you are most comfortable and confident with.</p><p><strong>Omniture Report Suite: </strong>Before uploading any data, make sure you have planned out what data points you want to capture.  Walk through the tables in the .dmp file to see what elements are most important to your business needs.  Once you have this, work with Client Care to set up the report suite.  Below is a list of <em><strong>some </strong></em>of the items you will want to consider.</p><ul><li>Define props / evars / events</li><li>Enable custom visitorID (uses userID from Jive)</li><li>Enable timestamps</li><li>Generic Data Source setup with full processing</li><li>FTP information</li></ul><p><strong>Local Folders: </strong>Working directory to hold batch files, cfml pages, data extracts, and a sub folder to move completed files to.</p><p>Once all of the configuration steps have been completed, you can begin tackle the automation.</p><p><strong>Work Flow - Steps</strong></p><ol><li>Download daily dmp file from Jive of the Analytic / Activity.</li><li>Restore dmp to local postgreSQL db</li><li>Extract data</li><li>FTP data extracts to Omniture</li></ol><p>Only 4 steps!  That is not so bad.  So lets look at what is involved in each step.</p><p><strong>Step 1:</strong> Jive provides an "Analytics" database in either a .sql.gz  or  a.dmp file.  I say "Analytics" because the data does not contain all of the traditional analytics information, page views, etc... What it does hold is activity.  Every time a user views a thread, blog post, poll etc... that is logged.  As is when users create content for the site.   All of this information is held within the myriad of tables in the .dmp file.  The database is a PostgreSQL format</p><p>The challenge is how to automate the download of this file.   I used a CFHTTP call as it allows me to provide a userid/password to authenticate into the Jive Cloud Admin site to retrieve the file.  It is also an easy way to customize the filename to include the date.  Each .dmp file is named in the following format:  accountname-yyyymmdd.dmp</p><pre class="brush: plain;">
		&lt;cfhttp
				username=&quot;yourLogin&quot;
				password=&quot;yourPassword&quot;
				method=&quot;GET&quot;
				url=&quot;#variables.URLLocation#&quot;
				result=&quot;dmpGet&quot;
				resolveURL=&quot;yes&quot;
				getAsBinary=&quot;yes&quot;		/&gt;
</pre><p>Once you have written the script to pull the database you have to schedule the download around the processing that Jive performs.  Each day, they delete the previous day's file and begin the process to create the next day's file.  This can take anywhere from 2-6 hours and during that time the new .dmp file is not there.  Each file is a full dump, so don't worry if you miss a day, you will always be able to go back and retrieve past information.</p><p>If the call to download tries to get the .dmp file when the file is not yet ready I create a  db_download.fail file in the working directory.  This is mostly used for debugging purposes.  Once the file is successfully downloaded I create a db_download.done and a db_download-yyyymmdd.done file.   The db_download.done file serves as a flag to the next step that the dmp file is there an ready to be restored.  The db_download-yyymmdd.done lets the download process know to not attempt to download the dmp file again for that day.</p><p><strong>Step 2:</strong> Restore .dmp to local postgreSQL</p><p>The controlling cfml page checks to see if the db_restore.done exists.  If it does, it executes a batch file that uses a command line command to restore the database and once the restore is finished it creates a db_restore.done file.  It also moves the db_download.done to the processed folder within the working directory and renames it to db_download-yyyymmdd.done.completed</p><pre class="brush: plain;">
&quot;C:\Program Files\PostgreSQL\8.4\bin\pg_restore.exe&quot; --clean --host %server% --port 5432 --username %username% --dbname %database% --verbose D:\WorkingDirectory\db.dmp
</pre><p><strong>Step 3:</strong> Extract Data</p><p>The controlling file checks to see if the db_restore.done file exists.  Once it finds the db_restore.done file, it executes each predefined  .sql file.  These files create a daily-dataset.txt file that is properly formatted to be ftp'd to omniture.  It also creates a .fin file of the same name to be ftp'd as well.   Once all of the .sql files have been processed it moves the db_restore.done file to the processed folder within the working directory and renames it to db_restore-yyyymmdd.done.completed.  The controlling file also creates a db_extract.done file.</p><pre class="brush: plain;">
WbExport -type=text
         -file='d:/workingdirectory/dailyfile.txt'
         -header=True;
// pseudo code
SELECT  Your data
WHERE to_char(data.date,'mm/dd/yyyy') = to_char(current_date-1,'mm/dd/yyyy');
WbExport -type=text
         -file='d:/workingdirectory/dailyfile.fin'
         -header=false;
select * from jivedw_user where user_id = -99;
</pre><p><strong>Step 4:</strong> FTP completed files to Omniture</p><p>The controlling file  checks to see if the db_extract.done file exists.  Once it find this, the I use  CFFTP to open a secure connection to the Omniture FTP server defined in the configuration.  Each file is ftp'd to Omniture along with the matching fin file.  Again these files are also moved to the processed folder in the local working directory and renamed with the time-stamp.</p><div
id="attachment_541" class="wp-caption alignnone" style="width: 659px"><a
href="http://www.rudishumpert.com/wp-content/uploads/2010/04/Jive-Automation.png"><img
class="size-large wp-image-541" title="Workflow" src="http://www.rudishumpert.com/wp-content/uploads/2010/04/Jive-Automation-1024x616.png" alt="" width="649" height="389" /></a><p
class="wp-caption-text">Click to see full size</p></div><p><strong>Next steps? Or as <a
href="http://www.kaushik.net/avinash/" target="_blank">Avinash</a> likes to say... So What?<br
/> </strong></p><p>Now that you have a daily process that will pull, transform, and load the activity data from your Jive installation into Omniture, what else can you do/discover.</p><ul><li>Find out which areas of the community are generating the most content</li><li>Create automated report publications to community administrators / moderators</li><li>Easily identify the most active:<ul><li>Users</li><li>Companies</li><li>Employees</li><li>Topics</li><li>etc.......</li></ul></li></ul><p>These are just a few things you can do with the activity data once you have it inside of Omniture.  What are some of the things you will use the data for?</p><p><a
href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F04%2F05%2Fjive-omniture-automation-happiness%2F&amp;linkname=Jive%20%2B%20Omniture%20%2B%20Automation%20%3D%20Happiness" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a
href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F04%2F05%2Fjive-omniture-automation-happiness%2F&amp;linkname=Jive%20%2B%20Omniture%20%2B%20Automation%20%3D%20Happiness" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a
href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F04%2F05%2Fjive-omniture-automation-happiness%2F&amp;linkname=Jive%20%2B%20Omniture%20%2B%20Automation%20%3D%20Happiness" title="Delicious" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a
href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2010%2F04%2F05%2Fjive-omniture-automation-happiness%2F&amp;linkname=Jive%20%2B%20Omniture%20%2B%20Automation%20%3D%20Happiness" title="Facebook" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a
class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://www.rudishumpert.com/2010/04/05/jive-omniture-automation-happiness/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Save the referrals!</title><link>http://www.rudishumpert.com/2009/11/17/referrer-pass-through/</link> <comments>http://www.rudishumpert.com/2009/11/17/referrer-pass-through/#comments</comments> <pubDate>Tue, 17 Nov 2009 19:47:56 +0000</pubDate> <dc:creator>Rudi</dc:creator> <category><![CDATA[Code Snipets]]></category> <category><![CDATA[ColdFusion]]></category> <category><![CDATA[Fritos]]></category> <category><![CDATA[Omniture]]></category> <category><![CDATA[Web Analytics]]></category> <category><![CDATA[Google Analytics]]></category> <category><![CDATA[Redirects]]></category> <category><![CDATA[Referrer]]></category><guid
isPermaLink="false">http://www.rudishumpert.com/?p=306</guid> <description><![CDATA[I ran across an interesting question on the yahoo web analytics group. Paraphrased: If you have a short easy to share/print/send email like www.mysite.com/cool and that redirects to the user to a long ungangly url like www.mysite.com/much/longer/url/to/get/customer/to/admit/that/ie6/is/thedevil.htm. What happens to the referrer data/info? Short answer? Most likely it is lost and your redirect will strip [...]]]></description> <content:encoded><![CDATA[<p>I ran across an interesting question on the yahoo web analytics group.</p><blockquote><p><em>Paraphrased</em>: If you have a short easy to share/print/send email like www.mysite.com/cool  and that redirects to the user to a long ungangly url like www.mysite.com/much/longer/url/to/get/customer/to/admit/that/ie6/is/thedevil.htm.  What happens to the referrer data/info?</p></blockquote><p>Short answer?  Most likely it is lost and your redirect will strip out that precious referrer data.  But, it does not have to depending on how you have your redirects set up.</p><p>For this example lets assume that you use a common redirect folder called "redir" .  So when you print or create a short easy to share email for your new campaign you want to sent out or shared.</p><blockquote><p>www.site.com/redir/ie6isthedevil</p></blockquote><p>And when a user types this in, or clicks on the link from an email they get taken to</p><blockquote><p>www.site.com/its/true/ie6/is/the/devil.ftw</p></blockquote><p>However, as the question above highlights, the referrer data from page to the short url is lost.  Fortunately, this fix to this is easy.  On the page that contains the actual redirect code, place this JavaScript in place.</p><pre class="brush: plain;">
&lt;script language=&quot;javascript&quot;&gt;
document.url = document.referrer;
&lt;/script&gt;
.
.....
(redirect code in language of choice)
</pre><p>It merely copies the referrer data into the DOM URL object on the redirect page to pass it along to the long final url.  Then all of your web analytic tracking code will function as expected.  (I tested this in Omniture &amp; Google Analytics)</p><p>That's it!</p><p>-Rudi</p><p><a
href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F11%2F17%2Freferrer-pass-through%2F&amp;linkname=Save%20the%20referrals%21" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a
href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F11%2F17%2Freferrer-pass-through%2F&amp;linkname=Save%20the%20referrals%21" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a
href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F11%2F17%2Freferrer-pass-through%2F&amp;linkname=Save%20the%20referrals%21" title="Delicious" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a
href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F11%2F17%2Freferrer-pass-through%2F&amp;linkname=Save%20the%20referrals%21" title="Facebook" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a
class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://www.rudishumpert.com/2009/11/17/referrer-pass-through/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Form Abandonment</title><link>http://www.rudishumpert.com/2009/11/11/form-abandonment/</link> <comments>http://www.rudishumpert.com/2009/11/11/form-abandonment/#comments</comments> <pubDate>Wed, 11 Nov 2009 19:26:11 +0000</pubDate> <dc:creator>Rudi</dc:creator> <category><![CDATA[Code Snipets]]></category> <category><![CDATA[ColdFusion]]></category> <category><![CDATA[Omniture]]></category> <category><![CDATA[Web Analytics]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[Form Abandonment]]></category><guid
isPermaLink="false">http://www.rudishumpert.com/?p=280</guid> <description><![CDATA[NOTE: The code samples below are merely a proof of concept. This solution is not actively in place in any production environmetn that I am involved with. I was talking to a fellow ColdFusion developer about a web site he was working on, specifically a registration form, and what were some of the best practices [...]]]></description> <content:encoded><![CDATA[<blockquote><p><strong>NOTE:</strong> The code samples below are merely a proof of concept.  This solution is not actively in place in any production environmetn that I am involved with.</p></blockquote><p>I was talking to a fellow ColdFusion developer about a web site he was working on, specifically a registration form, and what were some of the best practices with form length and such that would facilitate users filling out the form and submitting.   This is a common issue with web sites that will not be going away anytime soon.  In fact the questions he had are the same ones I have seen in dozens of blog posts trying to figure this out.</p><ul><li>How many questions to put on a form?</li><li>What type of questions work the best?</li><li>What question(s) scared off a user and kept them from completing the form?</li></ul><p>I know that there are a few "Form Abandonment" plug-ins out there for Omniture and the likes, but from what I've seen the data you get is somewhat limited.   If your form has 20 elements on it and the plug-in only lets you know what the last element with focus was, you have to really think about the validity of that data.  How do you know for sure that the user filled out the elements in order?  Did the developer of the form set the tab index correctly?  Did the user glance at the form, click somewhere near the bottom and then bail?  Did the user fill out half the form the shut down the browser?</p><p><span
id="more-280"></span></p><p>From my understanding of the tools out there today, you are not able to get accurate answers to the questions above.     However, this is an very interesting problem that got me thinking on how I could leverage ColdFusion to be able to capture and get more meaningful data from the abandoned forms.</p><p>The Challenge:</p><ul><li>Capture data by users from abandoned forms</li><li>Push that data into Omniture SiteCatalyst</li><li>Create a report with real, actionable data on form abandonment</li></ul><p>The Setup:</p><ul><li>ColdFusion 8</li><li> Client Variables stored in a database (SQL)</li><li> jQuery</li></ul><p><strong>Step 1</strong>:  Capture the form data</p><p>The trick to capturing the data would be to find a way to save the form data in some persistent variable so that the data could be retrieved later.  Right away I thought of the <a
title="More Information on ColdFusion Client Scope" href="http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=sharedVars_08.html" target="_blank">Client Scope</a> .   Then the task was to find a method that could be deployed to multiple forms across a site with minimal re-coding.    For that I wrote this snippet of jQuery:</p><pre class="brush: plain;">
&lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&gt;
$(document).ready(function(){
// Form Handling/Analysis Test
$('#Form2BeTracked').children().each(function() {
$(this).bind('change',function (event){
$.post(&quot;/includes/processFormProgress.cfm&quot;, $('#Form2BeTracked').serializeArray() );

});

});

});
&lt;/script&gt;
</pre><p>This jQuery function simply binds an onChange event to every form on the page it finds with the id: Form2BeTracked.   This is an easy to deploy script site wide and has no impact on the normal form behavior.</p><p>The code on the proccessFormProgress.cfm is all of 3 lines :</p><pre class="brush: plain;">
&lt;cfparam name=&quot;client.formProgress&quot; default=&quot;#session.cfid##session.cftoken#&quot;&gt;
&lt;cfwddx action=&quot;cfml2wddx&quot; input=&quot;#form#&quot; output=&quot;wddxSession&quot;&gt;
&lt;cfset client.formProgress = wddxSession&gt;
</pre><p>This code takes the entire Form Struct and saves it into the client scope/database</p><div
id="attachment_293" class="wp-caption aligncenter" style="width: 460px"><img
class="size-full wp-image-293" title="Form Data in the Client Scope" src="http://www.rudishumpert.com/wp-content/uploads/2009/11/clientScope.png" alt="Form data is saved real time in the client scope." width="450" height="358" /><p
class="wp-caption-text">Form data is saved real time in the client scope.</p></div><p>The nice part about this is that by default, ColdFusion saves the list of form elements in the form.fieldnames variable.  Using that we can get a count of the number of variables for this form, and then see that only 2 of the fields were filled out and what the values of those fields are.  All of this without the user clicking submit.</p><p><strong>Step 2</strong>:  Clear data on form submit</p><p>If the user submits the form, we need to clear the data in the client variable.  This is an easy one line of code to be added on the page that handles the normal submitting of the form.</p><pre class="brush: plain;">&lt;cfset client.formProgress = &quot;&quot;&gt;</pre><p>This will clear the form data out of the client variable.  This is an important step that can not be skipped or your count of abandoned forms will be inflated.</p><p><strong>Step 3</strong>:  Check for abandoned form data</p><p>By saving the form data in the client scope it will be held there in the database for as long as the time frame defined in the ColdFusion Administrator.  This setting will determine the frequency that you must check for abandoned form data.</p><pre class="brush: plain;">
select cd.cfid, cd.data, cg.lvisit from
CDATA as cd join CGLOBAL as cg
on cd.cfid = cg.cfid
where cg.lvisit &gt;= (your timeframe here )
and cd.data like 'formprogress%'
</pre><p>This should pull a result set with all the records of form data that has been saved. ie. abandoned.</p><p><img
src="http://www.rudishumpert.com/wp-content/uploads/2009/11/form-abandonedquery.png" alt="form-abandonedquery" title="form-abandonedquery" width="673" height="275" class="aligncenter size-full wp-image-298" /></p><p>With a little ColdFusion magic</p><pre class="brush: plain;">
&lt;cfquery name=&quot;abandoned&quot; datasource=&quot;#REQUEST.dsn#&quot;&gt;
	select cd.cfid, cd.data, cg.lvisit from
	CDATA as cd join CGLOBAL as cg
	on cd.cfid = cg.cfid
	where cg.lvisit &gt;= GETDATE()-1
	and cd.data like 'formprogress%'  

&lt;/cfquery&gt;

&lt;cfset variables.wddx2Convert = abandoned.data&gt;
&lt;cfset variables.wddxLen = len(variables.wddx2Convert)&gt;
&lt;cfset variables.wddx2Convert = right(variables.wddx2Convert,variables.wddxLen-13)&gt;
&lt;cfset variables.wddx2Convert = replacenocase(&quot;#variables.wddx2Convert#&quot;,&quot;##&quot;,&quot;&quot;,&quot;ALL&quot;)&gt;
&lt;cfdump var=&quot;#variables.wddx2Convert#&quot;&gt;

&lt;cfwddx action=&quot;wddx2cfml&quot; input=&quot;#variables.wddx2Convert#&quot; output=&quot;variables.form&quot;&gt;

&lt;cfset variables.formElementList = variables.form[&quot;fieldnames&quot;]&gt;
&lt;cfset variables.formElementCount = listlen(&quot;#variables.formElementList#&quot;)&gt;

&lt;cfset variables.formList = &quot;&quot;&gt;
&lt;cfloop list=&quot;#variables.formElementList#&quot; index=&quot;formItem&quot;&gt;
	&lt;cfset variables.tempValue = variables.form[&quot;#formItem#&quot;] &gt;
	&lt;cfset variables.valuePair = &quot;#formItem#:#variables.tempValue#&quot;&gt;
	&lt;cfset variables.formList = ListAppend(variables.formList,&quot;#variables.valuePair#&quot;,&quot;|&quot;)&gt;
&lt;/cfloop&gt;
</pre><p>You end up with a variable string that you can then submit to Omniture using the Data Insertion API. See this <a
href="http://www.rudishumpert.com/2009/09/11/use-omnitures-data-insertion-api/">post</a> on details if the API.</p><p><img
src="http://www.rudishumpert.com/wp-content/uploads/2009/11/form-dataDetail.png" alt="form-dataDetail" title="form-dataDetail" width="574" height="82" class="aligncenter size-full wp-image-299" /></p><p>As you can see from the image above, you now have the count of the form elements in the form along with the data values from the form elements that were filled out before the user abandoned the form.   With this, you can choose what format would be the most useful for your needs to really dig into abandoned forms.</p><p>-Rudi</p><p><a
href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F11%2F11%2Fform-abandonment%2F&amp;linkname=Form%20Abandonment" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a
href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F11%2F11%2Fform-abandonment%2F&amp;linkname=Form%20Abandonment" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a
href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F11%2F11%2Fform-abandonment%2F&amp;linkname=Form%20Abandonment" title="Delicious" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a
href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F11%2F11%2Fform-abandonment%2F&amp;linkname=Form%20Abandonment" title="Facebook" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a
class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://www.rudishumpert.com/2009/11/11/form-abandonment/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Omniture Developer User Group</title><link>http://www.rudishumpert.com/2009/10/21/omniture-developer-user-group/</link> <comments>http://www.rudishumpert.com/2009/10/21/omniture-developer-user-group/#comments</comments> <pubDate>Wed, 21 Oct 2009 14:22:37 +0000</pubDate> <dc:creator>Rudi</dc:creator> <category><![CDATA[Code Snipets]]></category> <category><![CDATA[ColdFusion]]></category> <category><![CDATA[Omniture]]></category> <category><![CDATA[Web Analytics]]></category> <category><![CDATA[Omniture Developer User Group]]></category><guid
isPermaLink="false">http://www.rudishumpert.com/?p=269</guid> <description><![CDATA[Hey folks, I wanted to let folks know about the Omniture Developer User Group that has started on Meetup.com. (http://www.meetup.com/OmnitureDevelopers) The purpose of the group is to provide a region agnostic user group for those involved on the developer / integration side of web analytics. Please join up and be on the lookout for regional [...]]]></description> <content:encoded><![CDATA[<p>Hey folks,</p><p>I wanted to let folks know about the Omniture Developer User Group that has started on Meetup.com. (<a
href="http://www.meetup.com/OmnitureDevelopers/">http://www.meetup.com/OmnitureDevelopers</a>)</p><p>The purpose of the group is to provide a region agnostic user group for those involved on the developer / integration side of web analytics.  Please join up and be on the lookout for regional meetings as well as virtual-web-ex style presentations as well.</p><blockquote><p>Our goal is to bring together the most serious web analytics and marketing optimization developers and innovators. We'll focus on discussing ideas and disseminating knowledge of how to innovate on top of the Omniture suite of products. Whether you're an established software provider, garage-based innovator, or junky who develops innovations while working at your day job, we're looking for you to share your perspective and create the next great marketing optimization products.</p></blockquote><div
style="text-align: center; width: 214px; font-family: tahoma, verdana, sans serif; font-size: 12px;"><a
href="http://www.meetup.com/OmnitureDevelopers/"> <embed
src="http://www.meetup.com/swf/membership_badge.swf?chapterid=1539962" width="214" height="142" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></a></div><p>-Rudi</p><p><a
href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F10%2F21%2Fomniture-developer-user-group%2F&amp;linkname=Omniture%20Developer%20User%20Group" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a
href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F10%2F21%2Fomniture-developer-user-group%2F&amp;linkname=Omniture%20Developer%20User%20Group" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a
href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F10%2F21%2Fomniture-developer-user-group%2F&amp;linkname=Omniture%20Developer%20User%20Group" title="Delicious" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a
href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F10%2F21%2Fomniture-developer-user-group%2F&amp;linkname=Omniture%20Developer%20User%20Group" title="Facebook" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a
class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://www.rudishumpert.com/2009/10/21/omniture-developer-user-group/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Pathing:  Internal Search Analysis.  (not just for page views)</title><link>http://www.rudishumpert.com/2009/10/16/pathing-internal-search/</link> <comments>http://www.rudishumpert.com/2009/10/16/pathing-internal-search/#comments</comments> <pubDate>Fri, 16 Oct 2009 15:35:21 +0000</pubDate> <dc:creator>Rudi</dc:creator> <category><![CDATA[Code Snipets]]></category> <category><![CDATA[Omniture]]></category> <category><![CDATA[Web Analytics]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[Google Mini]]></category> <category><![CDATA[Search Analysis]]></category><guid
isPermaLink="false">http://www.rudishumpert.com/?p=252</guid> <description><![CDATA[When I was at the Omniture training class a few weeks back, the instructor mentioned that an advantage of storing the internal search terms in a s.prop was that you could get pathing enabled on the s.prop and you would then be able to see not only what your visitors were searching on, but how [...]]]></description> <content:encoded><![CDATA[<p>When I was at the Omniture training class a few weeks back, the instructor mentioned that an advantage of storing the internal search terms in a s.prop was that you could get pathing enabled on the s.prop and you would then be able to see not only what your visitors were searching on, but how they refined their search.</p><blockquote><p><strong>Note:</strong> After you choose which s.prop you are going to use to store/capture the data in, you will need to contact Omniture Client Care to get pathing enabled for that s.prop</p></blockquote><div
id="attachment_254" class="wp-caption aligncenter" style="width: 610px"><img
class="size-full wp-image-254" title="Where does your path take you?" src="http://www.rudishumpert.com/wp-content/uploads/2009/10/pathing.jpg" alt="pathing" width="600" height="361" /><p
class="wp-caption-text">Where does your path take you?</p></div><p><span
id="more-252"></span><br
/> In a previous post, I went over how we capture the search terms from the Google Mini.   So when I returned from the training, I contacted client care and had then enable pathing on the s.prop and "Shazam!".  We now have pathing on the internal search terms.</p><p>This has been working great, and I've been really pleased with being able to see exactly how visitors refine their searches.  Recently, I had the opportunity to chat with Susan Fariss, at the American Chemical Society (<a
href="http://twitter.com/soozantf">@soozantf)</a> about search analytics and the questions came up on do we know where the user was on the site when they initiated the search and then what search result did they click on.. if any?   Well... I did not have those answers, but I sure wanted to.</p><p>So the question was could the following be accomplished:</p><ul><li>Detect/capture where visitor was on the web site when the search was initiated</li><li>Modify the google mini xslt to tag all of the search results so that the result clicked could be captured</li><li>Would this provide the full search pathing expected</li></ul><p><strong>Detect/capture where visitor was on the web site when the search was initiated:</strong><br
/> This was the easy part of the adventure for sure.  I already had a JavaScript function handling the initial search, so I added another function call in that</p><pre class="brush: plain;">
			function recordInternalSearchOmniture(){
				var s = s_gi(s_account);
				s.linkTrackVars=&quot;prop1&quot;;
				s.prop1 = s.pageName;
				s.tl(document.location.href,'o','InternalSearch');
				s.linkTrackVars=&quot;&quot;;
			}
</pre><p>This code snippet simply pulls the s.pageName and puts it into the same s.prop used to store the actual search terms, creating the "entry point" of our search path.</p><p><strong>Modify the google mini xslt to tag all of the search results so that the result clicked could be captured:</strong><br
/> This proved to be the pesky part of the adventure.  The challenge was to be able to add the jQuery function to tag the search results someplace where the Google xslt could access it.  After a few missteps I added the jQuery to a main .js file (not the s_code.js) that I was able to link to inside the xslt.   But first I needed to add a div with a specific Id to the xslt so that I would be able to tag the results with the tracking codes.  So inside the xslt I did the following.</p><pre class="brush: plain;">
&lt;!-- **********************************************************************
 Search results (do not customize)
     ********************************************************************** --&gt;
.
.
.
&lt;div id=&quot;googleSearch&quot;&gt;
&lt;!-- *** Customer's own result page header *** --&gt;
.
.
&lt;!-- *** HTML footer *** --&gt;
&lt;/div&gt;
</pre><p>So find the section that says "Search results (do not customize)" <img
src='http://www.rudishumpert.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> - I viewed this as more of a suggestion than a hard rule.  Inside this section, wrap the header/footer items with a new div with the id of "googleSearch" (or some other id of your choosing).  This is needed so that the jQuery function can find the elements that need the new tags.  Once that div is in place add a jQuery function to find all results in that div and tag them.  The first function below binds a function call to the a href tags in the search results.  The second function does pulls in the location of the search results and records where the user clicked.  This provides the "exit point" to our path.</p><pre class="brush: plain;">
$(document).ready(function(){
$('#googleSearch a').each(function(i) {
  var hrefval = $(this).attr('href');
  $(this).bind('click',function (event){
  	omniGoogleSearchResultClicked('Search Result Clicked',hrefval)
  	});
});
.
.
function omniGoogleSearchResultClicked(propTitle,hrefVal){
	var s = s_gi(s_account);
	s.linkTrackVars=&quot;prop1&quot;;
	s.prop1 = hrefVal;
	s.tl(document.location.href,'o',propTitle);
	s.linkTrackVars=&quot;&quot;;
}
</pre><p><strong>Would this provide the full search pathing expected:</strong><br
/> Yes!  This does indeed provide a full search path.</p><div
id="attachment_263" class="wp-caption aligncenter" style="width: 279px"><a
href="http://www.rudishumpert.com/2009/09/02/i-loathe-ie-6/"><img
class="size-full wp-image-263" title="It is true!" src="http://www.rudishumpert.com/wp-content/uploads/2009/10/searchpathing.png" alt="It is true!" width="269" height="134" /></a><p
class="wp-caption-text">I knew IE6 was evil!</p></div><p
style="text-align: center;"><p>Ok..  so maybe I changed the actual values, but this is the type of search pathing you can achieve with tracking the entry and exit points in the same s.prop as the search terms and having pathing enabled on that s.prop.</p><p>-Rudi</p><p><a
href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F10%2F16%2Fpathing-internal-search%2F&amp;linkname=Pathing%3A%20%20Internal%20Search%20Analysis.%20%20%28not%20just%20for%20page%20views%29" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a
href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F10%2F16%2Fpathing-internal-search%2F&amp;linkname=Pathing%3A%20%20Internal%20Search%20Analysis.%20%20%28not%20just%20for%20page%20views%29" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a
href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F10%2F16%2Fpathing-internal-search%2F&amp;linkname=Pathing%3A%20%20Internal%20Search%20Analysis.%20%20%28not%20just%20for%20page%20views%29" title="Delicious" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a
href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F10%2F16%2Fpathing-internal-search%2F&amp;linkname=Pathing%3A%20%20Internal%20Search%20Analysis.%20%20%28not%20just%20for%20page%20views%29" title="Facebook" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a
class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://www.rudishumpert.com/2009/10/16/pathing-internal-search/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Bing!  You have inflated traffic numbers!</title><link>http://www.rudishumpert.com/2009/10/06/bing-your-stats-are-done/</link> <comments>http://www.rudishumpert.com/2009/10/06/bing-your-stats-are-done/#comments</comments> <pubDate>Tue, 06 Oct 2009 12:09:47 +0000</pubDate> <dc:creator>Rudi</dc:creator> <category><![CDATA[Code Snipets]]></category> <category><![CDATA[ColdFusion]]></category> <category><![CDATA[Omniture]]></category> <category><![CDATA[Web Analytics]]></category> <category><![CDATA[Bing Bot]]></category> <category><![CDATA[BING Fake Referrer]]></category> <category><![CDATA[SiteCatalyst]]></category><guid
isPermaLink="false">http://www.rudishumpert.com/?p=230</guid> <description><![CDATA[The past couple of months we noticed a very odd trend the the geo-location / city data that was being saved in Omniture.  The great metropolis of Redmond, Washington was now the number 1 city of origin of our web visitors.  And this was not a small lead, they were the number 1 city by [...]]]></description> <content:encoded><![CDATA[<p><img
class="size-thumbnail wp-image-233 alignleft" style="margin: 5px;" title="Our #1 Fan!  " src="http://www.rudishumpert.com/wp-content/uploads/2009/10/514px-Seal_of_Redmond_Washington-150x150.png" alt="Our #1 Fan!  " width="150" height="150" /> The past couple of months we noticed a very odd trend the the geo-location / city data that was being saved in Omniture.  The great metropolis of Redmond, Washington was now the number 1 city of origin of our web visitors.  And this was not a small lead, they were the number 1 city by more than double the traffic from the number 2 spot.</p><p>Trying to find an explanation for all this, I checked the twitter-verse and did a little digging online, but did not have a chance to really dive into the issue until yesterday.<span
id="more-230"></span></p><p><a
href="http://twitter.com/OmnitureCare" target="_blank">@OmnitureCare</a> pointed me in the right direction with this link to a post on the <a
href="http://www.bing.com/community/forums/t/648564.aspx">Bing Forum. </a></p><blockquote><p><strong>From Bing Forum: </strong>I'm getting a ton of hits from IP 65.55.* that appear to be coming from user searches such as referrer "http://www.bing.com/search?q=copper" and user agents similar to "Mozilla/4.0 (compatible;  MSIE 6.0;  Windows NT 5.1;  SLCC1;  .NET CLR 1.1.4322;  .NET CLR 2.0.40607;  .NET CLR 3.0.04506.648)"</p></blockquote><p>The swell folks over at Microsoft claim that they are working on a new spider and working out the kinks.  Well this "kink" has been mucking with my data and is very annoying. Kink FAIL!   I pulled the web log files and began to search for all traffic from the IP Range of 65.55.*.*  Here is what I found:</p><pre class="brush: plain;">
2009-10-04 00:12:34 W3SVC1 127.0.0.1 GET /filename - 80 - 65.55.207.50 msnbot/2.0b+(+http://search.msn.com/msnbot.htm) 404 0 0
2009-10-04 00:12:48 W3SVC1 127.0.0.1 GET /filename - 80 - 65.55.109.1 Mozilla/4.0 200 0 0
2009-10-04 00:12:48 W3SVC1 127.0.0.1 GET /filename - 80 - 65.55.109.1 Mozilla/4.0 200 0 0
2009-10-04 00:12:48 W3SVC1 127.0.0.1 GET /filename - 80 - 65.55.109.1 Mozilla/4.0 200 0 0
2009-10-04 00:12:48 W3SVC1 127.0.0.1 GET /filename - 80 - 65.55.109.1 Mozilla/4.0 200 0 0
</pre><p>The first line above looks ok.  The bot clearly identifies itself and does not fire off the tracking JS code.  The next few lines appear to be normal "real" user traffic and do result in the tracking code being executed.   I check the IP address over at http://www.dnsstuff.com and get back that the IP address does indeed belong to Microsoft.</p><p><a
href="http://www.dnsstuff.com/tools/whois/?tool_id=66&amp;token=&amp;toolhandler_redirect=0&amp;ip=65.55.109.1"><img
class="aligncenter size-full wp-image-234" title="Gee thanks for the spam traffic Microsoft." src="http://www.rudishumpert.com/wp-content/uploads/2009/10/msWhoIS.png" alt="Gee thanks for the spam traffic Microsoft." width="316" height="366" /></a></p><p>I could list row after row of data from the log files with countless variations of traffic from various M$ ip addresses that do not identify them as bots.  All of the fake/spoofed traffic has this in common:</p><ul><li>65.55.*.*  IP address range</li><li>User Agent listed as "Mozilla/4.0" only</li></ul><p>Now that I have the "signature" of the bad traffic, I wanted to find a way to prevent this from falsely inflating our city and other visitor data.  I dug around trying to find an elegant way to do this with JavaScript only, but decided the best approach would be to leverage the ColdFusion platform we use and simply suppress the s_code file from being loaded if I was able to detect the traffic matched the above pattern.</p><pre class="brush: plain;">&lt;cfif findnocase(&quot;65.55.&quot;,&quot;#cgi.remote_addr#&quot;) GT 0 AND findnocase(&quot;Mozilla/4.0&quot;,&quot;#cgi.HTTP_USER_AGENT#&quot;) GT 0&gt;</pre><p>This IF block checks for the pattern and prevents the Omniture JS code from being loaded if both conditions are met.   I put this code in place around noon yesterday and in less than 24 hours I can see that this is working.</p><p><img
class="aligncenter size-full wp-image-236" title="Bye Bye Bad Bing Bot Badness" src="http://www.rudishumpert.com/wp-content/uploads/2009/10/redmondfake-traffic.png" alt="Bye Bye Bad Bing Bot Badness" width="578" height="202" /></p><p>I will be keeping a close eye on all the traffic reports to make sure that we are not losing any real traffic data, but I am confident that will will keep this current issue from jacking my data any further.</p><p>Below are a few sites I found that helped me in my research:</p><ul><li><a
href="http://solaroverpower.com/2009/06/16/is-microsoft-spoofing-blog-visits-to-generate-traffic-back-to-bing/" target="_blank">http://solaroverpower.com/2009/06/16/is-microsoft-spoofing-blog-visits-to-generate-traffic-back-to-bing/</a></li><li><a
href="http://www.webmasterworld.com/search_engine_spiders/3875363-5-30.htm" target="_blank">http://www.webmasterworld.com/search_engine_spiders/3875363-5-30.htm</a></li><li><a
href="http://www.webmasterworld.com/search_engine_spiders/3950463.htm" target="_blank">http://www.webmasterworld.com/search_engine_spiders/3950463.htm</a></li><li><a
href="http://www.bing.com/community/forums/p/648805/9549504.aspx?PageIndex=3" target="_blank">http://www.bing.com/community/forums/p/648805/9549504.aspx?PageIndex=3</a></li><li><a
href="http://www.bing.com/community/forums/t/648564.aspx" target="_blank">http://www.bing.com/community/forums/t/648564.aspx</a></li></ul><p>-Rudi</p><p>Updated 10/15/2009:</p><p>James Dutton found this bug showing up in Yahoo Web Analytics as well.  Read his tips to resolve it!<br
/> <a
href="http://insightr.com/blog/2009/10/15/yahoo-web-analytics-data-inflated-by-bing-and-how-to-fix-it.html?lastPage=true&amp;postSubmitted=true" target="_blank">Yahoo Web Analytics data inflated by Bing and how to fix it.</a></p><p><a
href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F10%2F06%2Fbing-your-stats-are-done%2F&amp;linkname=Bing%21%20%20You%20have%20inflated%20traffic%20numbers%21" title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a
href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F10%2F06%2Fbing-your-stats-are-done%2F&amp;linkname=Bing%21%20%20You%20have%20inflated%20traffic%20numbers%21" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a
href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F10%2F06%2Fbing-your-stats-are-done%2F&amp;linkname=Bing%21%20%20You%20have%20inflated%20traffic%20numbers%21" title="Delicious" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a
href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F10%2F06%2Fbing-your-stats-are-done%2F&amp;linkname=Bing%21%20%20You%20have%20inflated%20traffic%20numbers%21" title="Facebook" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a
class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://www.rudishumpert.com/2009/10/06/bing-your-stats-are-done/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Omniture / SalesForce Integration: Part 2 &#8211; s_code &amp; more.</title><link>http://www.rudishumpert.com/2009/09/24/omniture-salesforce-integration-part2/</link> <comments>http://www.rudishumpert.com/2009/09/24/omniture-salesforce-integration-part2/#comments</comments> <pubDate>Fri, 25 Sep 2009 02:04:03 +0000</pubDate> <dc:creator>Rudi</dc:creator> <category><![CDATA[Code Snipets]]></category> <category><![CDATA[Omniture]]></category> <category><![CDATA[Web Analytics]]></category> <category><![CDATA[RingLead]]></category> <category><![CDATA[SalesForce]]></category><guid
isPermaLink="false">http://www.rudishumpert.com/?p=217</guid> <description><![CDATA[If you missed Part 1, read it first. The past few weeks have brought some significant progress in the Omniture &#38; SalesForce integration efforts.  Thanks to the folks at Omniture we were able to figure out what was causing the data between the two systems not to flow. Within the SalesForce Campaign Module, the following [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.rudishumpert.com/2009/09/01/omniture-salesforcepart-1-configuration/" target="_self">If you missed Part 1, read it first.</a></p><p>The past few weeks have brought some significant progress in the Omniture &amp; SalesForce integration efforts.  Thanks to the folks at Omniture we were able to figure out what was causing the data between the two systems not to flow.</p><p>Within the <a
href="http://blogs.salesforce.com/marketing/campaign_management/" target="_blank">SalesForce Campaign Module</a>, the following new Omniture data fields must be populated: Allocation &amp; Origin</p><p><img
class="alignnone size-full wp-image-218" title="salesforce" src="http://www.rudishumpert.com/wp-content/uploads/2009/09/salesforce.png" alt="salesforce" width="703" height="89" /></p><p>Once this was set, the data exchange began to work right away.  Well.....  it began to work the next day, as the data exchange happens once a day.</p><p>Now to back up a step.  Part of the integration is making some changes to the s_code.js file.  Using the setCookieParam function you need to set additional values:</p><p><strong>s_code Changes</strong></p><pre class="brush: plain;">var external_campaign_param ='campid';
var internal_campaign_param ='iCampid';
var retouch_campaign_param ='rtCampid';</pre><p><strong>Page Code Changes</strong></p><pre class="brush: plain;">s.eVar20 = s.setCookieParam(external_campaign_param,s.getQueryParam(external_campaign_param),1,365);

s.eVar22 = s.setCookieParam(internal_campaign_param,s.getQueryParam(internal_campaign_param),1,365);
&lt;pre id=&quot;line531&quot;&gt;s.eVar23 = s.setCookieParam(retouch_campaign_param,s.getQueryParam(retouch_campaign_param),1,365);
</pre><blockquote><p>Note: The eVar's used above should be the same that you set up in Part 1 as defined in the implementation guide.</p></blockquote><p>These values will give you the ability to pass these values along whenever you submit data to SalesForce using <a
href="http://wiki.developerforce.com/index.php/Basic_Web2Lead_Implementation" target="_blank">Web2Lead</a> or <a
href="http://www.ringlead.com/" target="_self">RingLead</a> or however you submit data into SalesForce.</p><pre class="brush: plain;">&lt;cfhttpparam type=&quot;Formfield&quot; value=&quot;#arguments.omtr_clm__campaign_external__c#&quot; name=&quot;omtr_clm__campaign_external__c&quot;&gt;
 &lt;cfhttpparam type=&quot;Formfield&quot; value=&quot;#arguments.omtr_clm__campaign_internal__c#&quot; name=&quot;omtr_clm__campaign_internal__c&quot;&gt;
 &lt;cfhttpparam type=&quot;Formfield&quot; value=&quot;#arguments.omtr_clm__campaign_retouch__c#&quot; name=&quot;omtr_clm__campaign_retouch__c&quot;&gt;
</pre><p>As of the writing of this, data has been flowing between SalesForce &amp; Omniture for one week.  It's too early in the process to get a full understanding of how we will best be able to leverage the data exchange between the systems, but I am looking forward to exploring this further.</p><blockquote><p>Code snippets above are based on a ColdFusion environment and are meant to serve as psuedo code</p></blockquote><p>-Rudi</p><p><a
href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F09%2F24%2Fomniture-salesforce-integration-part2%2F&amp;linkname=Omniture%20%2F%20SalesForce%20Integration%3A%20Part%202%20%26%238211%3B%20s_code%20%26%23038%3B%20more." title="Twitter" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a
href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F09%2F24%2Fomniture-salesforce-integration-part2%2F&amp;linkname=Omniture%20%2F%20SalesForce%20Integration%3A%20Part%202%20%26%238211%3B%20s_code%20%26%23038%3B%20more." title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a
href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F09%2F24%2Fomniture-salesforce-integration-part2%2F&amp;linkname=Omniture%20%2F%20SalesForce%20Integration%3A%20Part%202%20%26%238211%3B%20s_code%20%26%23038%3B%20more." title="Delicious" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a
href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.rudishumpert.com%2F2009%2F09%2F24%2Fomniture-salesforce-integration-part2%2F&amp;linkname=Omniture%20%2F%20SalesForce%20Integration%3A%20Part%202%20%26%238211%3B%20s_code%20%26%23038%3B%20more." title="Facebook" rel="nofollow" target="_blank"><img
src="http://www.rudishumpert.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a
class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://www.rudishumpert.com/2009/09/24/omniture-salesforce-integration-part2/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching using disk

Served from: www.rudishumpert.com @ 2010-09-10 10:54:54 -->