Rudi Shumpert : Code By Numbers
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

1Sep/091

Omniture/SalesForce Integration Part 1: Configuration

As I set out on my latest adventure with Omniture, I decided to begin this project by actually reading the manual first. So, I downloaded and read the SalesForce: Genesis Integration Guide from Omniture. Ok..fine..maybe I skimmed some pages, but I read most of it. What I took away from it, was I was going to need to really plan this project out.

For starters, I was a bit stunned to discover that the default integration would take 9 eVars and 22 Custom Events, with an additional 33 custom events. (Holy smokes! 50 plus custom events!)

So based on the information from the manual, which is about the only information online I could find about the process, this was my initial task list:

1. Confirm SalesForce requirements with resident SalesForce expert.
2. Determine list of integration Custom Events needed. (which iof the 53)
3. Activate SalesForce Genesis plugin
4. Make changes to primary s_code files
5. Initial testing
6. roll out s_code changes to other report suites.

1 & 2 were easy.

#3. This was a whole other beast. I quickly realized that I needed to have the help of our resident SalesForce Expert to help with the configuration. There is simply too much about SalesForce data fields that I do not know. Not to mention the little bits of information that the Integration Guide leaves out.

Here are the items that were more of a challenge in the process, due to either missing information in the guide or lack of SalesForce knowledge.

eVar Classifications:

  • You must set up classifications for each eVar.
  • The select box provided to select SalesForce data fields is way way too narrow to be able to read the data field names.

Configure the SalesForce.com Dashboard:

  • You must add classifications for all elements on this page.
  • The options provided to add classifications on this page are directly pulled from the classifications selected on the eVar Classifications.
  • If you have to go back to edit your eVar Classifications any options selected here will not be saved.

Map SiteCatalyst Events

  • Even though the Integration Guide says that the Marketing Sourced/Touched: Opportunitiy: New is optional...it's not.  I had to add a mapping for this.

#1 thing I learned in the configuration: make darn sure you have a great SalesForce person to assist you with this. I am sure I would never have selected the right objects to classify without their help.

It is also apparent that I need a new task list, one that contains a lot more details and steps than I first planned.  I will be working on fleshing this out as I progress through the rest on the integration.

This ends the configuration portion of my adventure, off to make changes to the s_code.

-Rudi

Part 2: s_code & more

19Aug/096

One Player to Rule Them All…

Last week I read a great post by Vaugn Denny about the JW Video Player. And being of the curious sort I had to investigate further. So I visited the JW Player web site. And I was greeted with a page that claimed that they had a video player that would not only play flv files, but wmv files as well. And with further reading the player claims to have an open API with access to the player events. Could it be true?

One Player to rule them all, One Player to track them,
One Player to bring them all and in the darkness correlate them
In the Land of Analytics where the Shadows lie.

theringvx6
Read the rest of this entry »

17Aug/094

Track Your FLV Video Files With Omniture & FlowPlayer

EDIT:  After I wrote this I found a new video player that will play flv, wnv, and youtube videos.

I've been working on our Omniture integration for a while now and recently I started working on the task of tracking our videos. I know that Omniture has some very nice features you can use with Action Source code, but what if all you have access to is the end result of the flv file? With no tools to edit a player, or the ability to embed the code in the files/players? It's a bit of a challenge to say the least.

I needed a way to track flv files with the same amount of details that the Action Source would provide in a reliable, easy to duplicate fashion. My search for this led me to an FLV player called FlowPlayer. It is a nice easy to implement player with easy access to the API and the events.
Read the rest of this entry »

6Aug/098

Adventures with Omniture WordPress Plug-in

Update: I have been working on my own version of an Omniture WordPress Plugin!  Find it here: http://www.rudishumpert.com/projects/wp-omniture/

It's rare to find a plug-in these days that work exactly as advertised. Hell, it is rare to find one that is only somewhat painful to implement. So when I began the day with the task to implement the WordPress plug-in for Omniture I was skeptical. But it was much easier that I thought. Below are the steps I went through to install the plug-in, perhaps this will be helpful to someone!

My company is running a a blog using the 2.7.1 version of WordPress hosted on our own server. I set up a brand new report suite in SiteCatalyst just for the blog, exported the new s_code.js file and moved it to the linux server. Once on the server it was just a matter of moving the plugin files into the wp-content/plugins/ folder.

Then move the new s_code.js file into the wp-content/plugins/OmnitureSiteCatalyst/js/ folder. Once all the files are on the server, login to the admin section of your blog, and under Plug-ins, find and activate the Omniture plugin.

omnisettings

You're almost there. Next you go to Settings > Omniture Settings.

On this page you provide the plugin with the pathing information to the s_code file. The last item on the page needs the noscript Image url like this : http:/yournamespacehere.112.2o7.net/b/ss/reportsuite-name-here/1/H.20.3--NS/0

onnisettings2

All that is left is to turn on the tracking and you're done.

Note: We were using the "Bookmarkify" plugin to add those handy links to the share the blog posts with others, but adding the Omniture plug-in caused some formatting issues with text wrapping all over the place. I switched to a different extension called: Add to Any, and it works fine.

Within 20 minutes I was seeing the data flowing into my reports in Site Catalyst. Start to finish this project took about 1 hour, not counting the time waiting for the data to show up in SC.

-Rudi

NOTE:  If you see the error below when trying to activate the plugin, it is most likely due to an issue with PHP versions.  The plugin works on PHP 5.x  but not 4.X version.

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/content/r/s/h/code/html/codedir/wp-content/plugins/OmnitureSiteCatalyst/inc/omnitureControlClass.php on line 9
Get Adobe Flash playerPlugin by wpburn.com wordpress themes