Search code examples
javascriptadobe-analytics

Suppress Omniture s.t() call from generating a pageview


I have a project that has the standard, borderline unreadable Omniture JavaScript tracking code in it that is below.

<script language="JavaScript">
    var s_account = "{MY ACCOUNT}";
</script>
<!-- START OMNITURE -->
<!-- SiteCatalyst code version: H.1.
Copyright 1997-2005 Omniture, Inc. More info available at
http://www.omniture.com -->
<script type="text/javascript" src="http://MYDOMAIN.com/javascripts/metrics/s_code_trb.js"></script>
<script language="JavaScript">

    s.pageName="Project name"   
    s.server="MYDOMAIN.com" 
    s.prop38="3rd Party";
    s.eVar21="3rd Party";    


/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code=s.t();if(s_code)document.write(s_code) 
</script>
<!--/DO NOT REMOVE/-->
<!-- End SiteCatalyst code version: H.1. -->
<!-- END Omniture code -->

However, this code always generates a pageview.

This project needs to be iframed into our CMS, which means that the container page in the CMS has already generated a pageview. We want to be able to track clicks within the project (e.g. a click on a particular button) but right now, this results in duplicate pageviews, one for the CMS page and one for the page inside the iframe.

Adobe documentation says that s.t() must always be called before s.tl() but vaguely hints that s.t() can be modified so that instead of generating a pageview, it generates a tracking link.

A quick Googling turned up this almost incomprehensible Twitter conversation that seems to hint at the solution to send as parameters pev1, pev2 and pe=lnk_o. But that is still beyond my understanding.

Is this true? Any Omniture gurus out there who can help me figure out how I would do this?


Solution

  • You don't need to call s.t() before you call s.tl(). Loading the s_code.js file and then calling the s.t() function will generate a page view as you have seen, but you can just as easily load the s_code.js file and only call s.tl() from onclicks in the links you need to track.