title: Omniture tracking and jQuery
body: <p>I've been creating a few websites with content being pulled with jQuery and CSS calling to the #div containers. Does anyone know a way to use Omniture Site Catalyst tracking code while creating these types of one page websites? Possible? </p>
  
  <p>Previously I've been utilizing Omniture with more traditional html sites by inserting the below chunk of hardly legible code provided by the software. It which case it seems to track all the the .html pages.</p>
  
  <pre><code>       &lt;!-- SiteCatalyst Code version: H.17.
  Copyright 1997-2008 Omniture, Inc. More info available at
  http://www.omniture.com --&gt;
  &lt;script language="JavaScript" type="text/javascript" src="http://www.urlofsite.com/js/s_code.js"&gt;&lt;/script&gt;
  &lt;script language="JavaScript" type="text/javascript"&gt;&lt;!--
  /************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
  var s_code=s.t();if(s_code)document.write(s_code)//--&gt;&lt;/script&gt;
  &lt;script language="JavaScript" type="text/javascript"&gt;&lt;!--
  if(navigator.appVersion.indexOf('MSIE')&gt;=0)document.write(unescape('%3C')+'\!-'+'-')
  //--&gt;&lt;/script&gt;&lt;noscript&gt;&lt;a href="http://www.omniture.com" title="Web Analytics"&gt;&lt;img
  src="http://code.urlofsite.com/b/ss/ranhrollup/1/H.17--NS/0"
  height="1" width="1" border="0" alt="" /&gt;&lt;/a&gt;&lt;/noscript&gt;&lt;!--/DO NOT REMOVE/--&gt;
  
  &lt;!-- End SiteCatalyst code version: H.17. --&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><em>Is there anyway to break that up, and create a few lines of Javascript with if statements that apply the tracking code to specific <code>#div#</code>?</em></p>
  
  <p><em><strong>Update:</em></strong> </p>
  
  <p>I spoke with a specialist and he stated that you can add additional s.t() calls in the onClick events for anything you wish to track as an additional page view. As an example, you have the following click event handler set up for the "Books" link</p>
  
  <pre><code>$('a.manned-flight').click(function() {
    $('html, body').animate({
    scrollTop: 1250
  }, 1000, function() {
    parallaxScroll(); // Callback is required for iOS
  });
    return false;
  });
  </code></pre>
  
  <p>You can add tracking code to this function to specify a different pageName and send off an additional Page View image request as follows:</p>
  
  <pre><code>$('a.manned-flight').click(function() {
    s.pageName = "www.urlofwebsite.com:Books";
    s.t();
    $('html, body').animate({
      scrollTop: 1250
    }, 1000, function() {
      parallaxScroll(); // Callback is required for iOS
    });
    return false;
  });
  </code></pre>
  
  <p><em>But with how large the site is and how much content areas I'd have to define, this seems like an impractical approach and somewhat clunky, code wise. Is there anyway to do this with a Javascript array?</em></p>