Track Omniture and jQuery

I create several sites with content pulled out using jQuery and CSS calling #div containers. Does anyone know a way to use SiteNell Omniture site tracking code when creating these types of single page web pages? Possible?

I used to use Omniture with more traditional html sites, pasting below a piece of subtle code provided by the software. In which case does it appear to be tracking all .html pages.

       <!-- SiteCatalyst Code version: H.17.
Copyright 1997-2008 Omniture, Inc. More info available at
http://www.omniture.com -->
<script language="JavaScript" type="text/javascript" src="http://www.urlofsite.com/js/s_code.js"></script>
<script language="JavaScript" type="text/javascript"><!--
/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code=s.t();if(s_code)document.write(s_code)//--></script>
<script language="JavaScript" type="text/javascript"><!--
if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')
//--></script><noscript><a href="http://www.omniture.com" title="Web Analytics"><img
src="http://code.urlofsite.com/b/ss/ranhrollup/1/H.17--NS/0"
height="1" width="1" border="0" alt="" /></a></noscript><!--/DO NOT REMOVE/-->

<!-- End SiteCatalyst code version: H.17. -->
</body>
</html>

Anyway, to break this down and create some Javascript lines with if statements that apply the tracking code to a specific one #div#?

Update:

, , s.t() onClick , , . , ""

$('a.manned-flight').click(function() {
  $('html, body').animate({
  scrollTop: 1250
}, 1000, function() {
  parallaxScroll(); // Callback is required for iOS
});
  return false;
});

, :

$('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;
});

, . Javascript?

+5
2

Omniture Web CMS, , . (.. ). , , , .js , , , , ( , ). , Omniture , . , , javascript, , Omniture. , SEO, , Omniture. .

, , . , , div. , div , Omniture, javascript javascript (, jQuery). , , HTML, , , a.manned-flight. , .

, , , HTML. , Omniture. , .

, . , , .

<div class="product-item">
    <input class='item-title' type='hidden' value='Book Title #1 Specific Page Name'/>
    <input class='other-stuff-for-analytics' type='hidden' value='More stuff here'/>
    <h3>Book Title #1</h3>
    <p>Description of Book Title #1 and some junk...</p>
</div>
<div class="product-item">
    <input class='item-title' type='hidden' value='Book Title #2 Specific Page Name'/>
    <input class='other-stuff-for-analytics' type='hidden' value='More stuff here'/>
    <h3>Book Title #2</h3>
    <p>Description of Book Title #2 and some junk...</p>
</div>
<div class="product-item">
    <input class='item-title' type='hidden' value='Book Title #3 Specific Page Name'/>
    <input class='other-stuff-for-analytics' type='hidden' value='More stuff here'/>
    <h3>Book Title #3</h3>
    <p>Description of Book Title #3 and some junk...</p>
</div>

<!-- The code below could be in your template/include file/master page/view/ .js file -->
<script>
    $('div.product-item').click(function () {
        var analyticsPageName = "";
        /* Possibly pull the value from hidden input  */
        analyticsPageName = $(this).children('input.item-title').val();

        /* OR Pull the information from the block of HTML that has the page title */
        analyticsPageName = $(this).children('h3').text();

        // ---OR---
        //whatever else you need to do to scrape your HTML
        //to get the information to plug into a variable

        s.pageName = analyticsPageName;
        s.t();
        $('html, body').animate({
            scrollTop: 1250
        }, 1000, function () {
            parallaxScroll(); // Callback is required for iOS
        });
        return false;
    });
</script>
+5

, JQuery jquery.address, JQuery. , Google Analytics, Omniture SiteCatalyst.

.

0

All Articles