Index: omniture.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/omniture/omniture.module,v
retrieving revision 1.1.2.6
diff -u -p -r1.1.2.6 omniture.module
--- omniture.module	3 Oct 2007 15:18:51 -0000	1.1.2.6
+++ omniture.module	18 Oct 2007 17:54:17 -0000
@@ -106,13 +106,23 @@ function omniture_footer($main = 0) {
 
     // Format and combine variables in the "right" order
     // Right order is the code file (least likely to be maintained)
+    // Then vars sent to us from Hooks to other modules
     // Then admin settings with codesnippet first and finally taxonomy->vars
     $extra_variables_formatted = "";
+    
     if (isset($omniture_inc_vars)) {
       foreach ($omniture_inc_vars as $variable => $value) {
         $extra_variables_formatted .= "\n". $variable .'="'. $value .'";';
       }
     }
+    
+    $omniture_hooked_vars = module_invoke_all('omniture_variables',$main);
+    if (isset($omniture_hooked_vars)) {
+      foreach ($omniture_hooked_vars as $variable => $value) {
+        $extra_variables_formatted .= "\n". $value;
+      }
+    }
+    
     $extra_variables_formatted .= $codesnippet;
 
     if (isset($omniture_vocab_vars)) {
@@ -126,8 +136,8 @@ function omniture_footer($main = 0) {
     $script .=  check_plain(variable_get("omniture_js_file_location",'http://www.example.com/js/s_code_remote_h.js'));
     $script .= '"></script>';
     $script .= '<script language="JavaScript"><!--'."\n";
-    $script .= '/* You may give each page an identifying name, server, and channel on'."\n";
-    $script .= 'the next lines. */'."\n";
+    $script .= '// You may give each page an identifying name, server, and channel on'."\n";
+    $script .= '//the next lines.'."\n";
     $script .= 's.pageName=""'."\n";
     $script .= 's.server=""'."\n";
     $script .= 's.channel=""'."\n";
