I'm keeping a doubt about what, inside SiteCatalyst s_code, exactly fires the first automatic call on the page load.
In fact, I faced two different scenarios that made me a little confused.
Usually, the s_code library is gone with a page-bottom code that figures like the one below:
<!-- SiteCatalyst code version: H.26.0.
Copyright 1996-2011 Adobe, Inc. All Rights Reserved
More info available at http://www.omniture.com -->
<script language="JavaScript" type="text/javascript" src="path_to/s_code.js"></script>
<script language="JavaScript" type="text/javascript">
/* You may give each page an identifying name, server, and channel on the next lines. */
/************* 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><img src="http://metrics...." height="1" width="1" border="0" alt=""/></noscript><!--/DO NOT REMOVE/-->
<!-- End SiteCatalyst code version: H.26.0. --><br/><br/>
I ended up that this part: var s_code=s.t();
fires the first automatic call (via the t() method) but I'm wondering why the if(s_code)document.write(s_code)
is needed.
Removing these two directives would result in stopping any automatic call on the page load.
When s_code is served by the DTM, instead, seems to fire the first call without the page-bottom code, just by the s_code library loading.
Both the stand-alone s_code and the DTM one are H.x versions.
So my final questions are:
- Why this part var s_code=s.t();if(s_code)document.write(s_code)
is needed at the page-bottom?
- Exactly what fires the automatic s_code call ?
Thanks a lot.