Rudi Shumpert : Code By Numbers
24Sep/091

Omniture / SalesForce Integration: Part 2 – s_code & more.

If you missed Part 1, read it first.

The past few weeks have brought some significant progress in the Omniture & 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 new Omniture data fields must be populated: Allocation & Origin

salesforce

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.

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:

s_code Changes

var external_campaign_param ='campid';
var internal_campaign_param ='iCampid';
var retouch_campaign_param ='rtCampid';

Page Code Changes

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);
<pre id="line531">s.eVar23 = s.setCookieParam(retouch_campaign_param,s.getQueryParam(retouch_campaign_param),1,365);

Note: The eVar's used above should be the same that you set up in Part 1 as defined in the implementation guide.

These values will give you the ability to pass these values along whenever you submit data to SalesForce using Web2Lead or RingLead or however you submit data into SalesForce.

<cfhttpparam type="Formfield" value="#arguments.omtr_clm__campaign_external__c#" name="omtr_clm__campaign_external__c">
 <cfhttpparam type="Formfield" value="#arguments.omtr_clm__campaign_internal__c#" name="omtr_clm__campaign_internal__c">
 <cfhttpparam type="Formfield" value="#arguments.omtr_clm__campaign_retouch__c#" name="omtr_clm__campaign_retouch__c">

As of the writing of this, data has been flowing between SalesForce & 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.

Code snippets above are based on a ColdFusion environment and are meant to serve as psuedo code

-Rudi

23Sep/090

“If wishes were horses beggars would ride”

Thanks to the magic of the internet & twitter I read a request this morning for a wish list of integration ideas for Adobe + Omniture, from @BrettError. I knew that I would not be able to fit my list in the 140 characters allowed by twitter, so I will list them out here.

Of all the Adobe products out there I use ColdFusion almost exclusively (not counting reading PDF's with Acrobat), so my list will be very slanted towards items I would love to see from an Omniture + ColdFusion perspective, that would make my job of implementing and optimizing the Omniture code & tags easier. That being said, this list below could easily be ported over to whatever development platform the site to be tracked is built on.

1) Tag library integration / validation within the soon to be released ColdFusion IDE - CF Builder. Much like the integrated JS libraries that can be added to other Eclipse based IDE's

2) Dedicated AJAX support - ok, so maybe this one has nothing to do with ColdFusion specifically but it would be great to have a defined/dedicated AJAX tag like s.trackAJAX() instead of having to use the custom link tracking s.tl() to track AJAX events. More and more of what I do is on RIA, AJAX heavy elements where a user/web visitor can spend a long time and make many clicks on AJAX elements without ever triggering a page reload.

3) Native integration with the ColdFusion session variables to by default populate many of the page specific variables to send to Omniture. (pageName, server, channel, etc.)

4) Built in tags to use the Data Insertion API to push data into Omniture as an alternative to the JS Beacon. Having this as a CF tag, might make it easier to accomplish #2 above.

5) Community. The Adobe ColdFusion is a loyal and active community and serves as a great example of the effectiveness of having a great active and supported developer community.

6) Enhance documentation by creating Adobe AIR versions such as this. I use this version of the Adobe Live Doc's all the time. Very handy!

So, there it is. My 2/5's of a nickel on what I would love to see as a results of the Adobe(ColdFusion) + Omniture integration.

-Rudi

PS. The original tweet request for the wish list made me instantly think of a quote my mom often repeated to me when I would say "I Wish...."

“If wishes were horses beggars would ride”

19Sep/090

Omniture & ColdFusion: Why you should care.

So you use ColdFusion and by now you have heard the news that Omniture is going to be purchased by Adobe. So what?  Why should you care?

omni-cf

Read the rest of this entry »

18Sep/092

Adventures in Utah!

This week I had the great fortune to go to Orem Utah for Omniture SiteCatalyst Implementation.   I was excited not only for the training, but also this was my first trip to Utah.   My flight got in well after dark so I did not see the mountains until the next morning, but man is it pretty out there!

Orem UT

I've been busy for the past few months working to integrate Omniture into our web site, and I have made a lot of good progress and I was quite sure that there was still much to learn in the training, however, I was not prepared for how much I still had to learn.

Despite all I had managed to learn on my own, and the resources I had managed to find on the web, there were some basic concepts that had escaped me (and will be rectified):

Core understanding of the 4 types of Omniture variables. (Traffic, Conversion, Configuration, Automatic):
I had a basic grasp on how each of these variables worked, but had not wrapped my head around how each of these variables not only related to other variables of the same type,  but how to properly format and track each one to maximize the detail you can achieve within SiteCatalyst.

Clearly define business goals & requirements before you code ;)
In the process of jumping head first into the coding and figuring out ways to get the data we needed into Omniture, the critical step of getting all the goals defined and updating our Solution Design Document to reflect the goals was skipped.

Have Client Care enable additional features:
Yet another seemingly simple item of having pathing enabled, and adding additional metrics to variables , was missed.

There are a few other small things that I might go into more detail later, but this is as much ignorance on this topic I wish to share at this time.   The major item I am taking away from this training is that no matter how much you think you know, there is always something else to learn.

I would also like to give kudos to the trainers from Omniture!  Our instructor, Doc Cochran, was extremely knowledgeable about SiteCatalyst, and took the time to make sure that any and all of our questions were answered.   He also had a great way of relating each example/item to a real world scenario that all could benefit from.

From this class I have a full list of items to review and address once I am back at work and I am looking forward to applying the new knowledge and getting the full benefit from our investment in Omniture.

_______

I would also like to thank the other Omniture employees that I was able to meet with to discuss past and future initiatives we are working on.   It was great to be able to sit face to face and talk though some past successes and challenges with these folks.

_______

Lastly, it was a little on the surreal side to be in Orem when the news broke that Adobe was buying Omniture.  There are been many, many articles written about this and I will throw in my 2/5's of a nickel.   As a ColdFusion developer I have worked with many folks in the Adobe community for some time and have always been impressed with the dedication to innovation that is part of Adobe's culture.   I truly think that this is a great fit and the communities of both products/companies should benefit greatly from this merger.   I am looking forward to seeing how they will be able to tie the technologies together.

I had an absolutely great trip to Utah.  I learned tons, met great people, and soaked in the amazing landscapes!

Bridal Veil Falls

-Rudi

4Sep/090

Hierarchy Data In Omniture

NOTE:  If your looking for the article on Omniture & ColdFusion: Why you should care. Click Here.  I botched the link in the original tweet.

I was reading a post on WebAnalyticsLand about a SiteCatalyst plugin to populate the s.hierN variables from the URL, and it got the gears turning. I wonder if I could get that to work using a combination of ColdFusion & JS instead of just making edits to the s_code file.

Some things to consider before implementing Hierarchies: (swiped from Omniture's Manual)

  • There are five hierarchy variables available, which must be enabled by Omniture ClientCare.
  • At the time the hierarchy is enabled, you will need to decide on a delimiter for the variable and the maximum number of levels for the hierarchy.
  • Before implementing hierarchies, refer to the Channels and Hierarchies white paper.
  • The delimiter may not be changed once the hierarchy is setup. If the delimiter for your hierarchy must be changed, contact Omniture ClientCare.
  • The number of levels may not be changed once the hierarchy is set up.

Once the hierarchy is activated, you should see it in SiteCatalyst under the Site Content Menu item (In version 14.6)

That concludes the configuration portion of the adventure. Now to the coding!

Note: I code in a ColdFusion environment in which I have a .cfm page that pulls the s_code.js into it so I can use some built in CFML functions to tweak the data.

Goals for this adventure were to:

  • Dynamically set the s.hierN variable on every page
  • Prevent levels greater than 5 from being passed
  • Prevent filenames being passed as levels (index.cfm)
  • And of course..get it all working to provide a hierarchical view of our web traffic. :)
<cfset variables.omniHierList = cgi.path_info >
<cfset variables.omniHierListLen = ListLen(variables.omniHierList,"/")>
<cfset variables.newOmniHierList = ListChangeDelims(variables.omniHierList,"|","/")>
<!--- Check the list len to make sure we do no exceed the level depth --->
<cfset variables.lastItem = ListGetAt(variables.newOmniHierList,variables.omniHierListLen,"|")>
<cfif FindNoCase(".","#variables.lastItem#") GT 0>
 <cfset variables.newOmniHierList = ListDeleteAt(variables.newOmniHierList,variables.omniHierListLen,"|")>
</cfif>

This will result in: Assuming of course that your current path is "/root/evil/browsers/IE6/demonspawn/use/firefox.ftw"

Struct

So what I've done is parse through the cgi.path_info variable, change the delimiter to | and removed the filename from the end of the list.  But as you can see I am left with a list of 6 items and I can only send 5 levels to the s.hier I had ClientCare activate.  I was told that the extra's would be ignored, but I do not like to leave things to chance, so I added one more set of code.

<cfif variables.omniHierListLen GT 5>
 <cfset variables.newOmniListTrim = "">
 <cfloop from="1" to="5" index="i">
 <cfset variables.newOmniListTrim = ListAppend(variables.newOmniListTrim,ListGetAt(variables.newOmniHierList,#i#,"|"),"|")>
 </cfloop>
 <cfset variables.newOmniHierList = variables.newOmniListTrim>
 </cfif>

Now you have a list of a max of 5 items to set the s.hierN variable to.

hier

This was one of the easier Omniture adventures so far!

-Rudi

Get Adobe Flash playerPlugin by wpburn.com wordpress themes