Rudi Shumpert : Code By Numbers
16Oct/094

Pathing: Internal Search Analysis. (not just for page views)

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.

Note: 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

pathing

Where does your path take you?

Read the rest of this entry »

26Aug/090

Capture Search Terms From Your Google Mini into Omniture

Yesterday, saw a twitter from @omtrdeveloper about tracking Google Site Search in Omniture.  This reminded me that I needed to do that for our site, except we do not use the Google Site Search, we use the Google Mini Search Appliance.

Google Mini

Here are the steps I took to integrate/capture the search terms into Site Catalyst.

Step 1.  Locate and backup your searchtemplate.xslt file.

Step 2.  In the section of the code that has the sections labeled "(can be customized)" add this code block.

<!-- **********************************************************************
 Omniture SiteCatalyst code (can be customized)
 ********************************************************************** -->

<xsl:template name="sitecatalyst">
 <xsl:param name="query"/>
 <xsl:param name="matches"/>
 <xsl:comment>
 SiteCatalyst : Google Mini Search Integration
 </xsl:comment>
 <script language="JavaScript" type="text/javascript" src="INSERT-DOMAIN-AND-PATH-TO-CODE/s_code.js"></script>
 <script language="JavaScript" type="text/javascript">
 <xsl:comment>
 s.eVar1="<xsl:value-of select='$query'/>"
 var s_code=s.t();if(s_code)document.write(s_code)
 </xsl:comment>
 </script>
 <script language="JavaScript" type="text/javascript">
 <xsl:comment>
 if(navigator.appVersion.indexOf('MSIE')>=0)
 document.write("unescape('%3C')+'!-'+'-'")
 </xsl:comment>
 </script>
 <xsl:comment>
 End SiteCatalyst : Google Mini Search Integration
 </xsl:comment>
</xsl:template>

NOTES:
1. Replace the"INSERT-DOMAIN-AND-PATH-TO-CODE" with the location where you uploadedthe s_code.js file:
2. Be sure to use an absolute path.  http://www.rudishumpert.com/subfolder/s_code.js
3. Code above assumes you are using s.prop1.  Change value as needed.

Step 3.  Next, locate the XSL template named, search_results.

<!-- **********************************************************************
Search results (do not customize)
 ********************************************************************** -->
<xsl:template name="search_results">
...
...
<body onLoad="resetForms()" dir="ltr">

and place the following code  opening <body> tag:

 <!-- *** Add Omniture SiteCatalyst code *** -->
 <xsl:choose>
 <xsl:when test="RES">
 <xsl:call-template name="sitecatalyst">
 <xsl:with-param name="query" select="Q"/>
 </xsl:call-template>
 </xsl:when>
 <xsl:otherwise>
 <xsl:call-template name="sitecatalyst">
 <xsl:with-param name="query" select="Q"/>
 </xsl:call-template>
 </xsl:otherwise>
 </xsl:choose>

Step 4.  Deploy code to test/production making sure to backup a copy of your existing XSLT template (just in case).

You should now be able to see the search terms being passed to Omniture using your debugging tool of choice.

-Rudi

EDIT:  changed the Omniture variable used from prop1 to evar1 so we could add sub relations to the element.

   
Get Adobe Flash playerPlugin by wpburn.com wordpress themes