Ok I have some custom Omniture code I need to add to a Drupal site. All is good as I have added the Javascript code to the themes template page. The code shows up on all the pages as expected but I have a couple of PHP variables that I need to print in the Javascript that are coming up blank.
<?php
$omniture_event = "test this works as expected";
$omniture =<<<OMNITURE
<script language="JavaScript"><!--
s.events="{$omniture_event}"
s.landing="{$omniture_landing}"
OMNITURE;
echo $omniture;
?>
but $omniture_landing is set on the landing page only and it looks like the template page is being loaded first then the content of the page is being added. I can print the value to the screen and I see the Javascript in the footer as expected with the other PHP variable set, but when I try to set the variable on the landing page it comes up blank in the javascript.