Index: omniture.module
===================================================================
--- omniture.module	(revision 8780)
+++ omniture.module	(working copy)
@@ -262,6 +262,38 @@
 function omniture_get_variables() {
   return omniture_set_variable();
 }
+/*
+ * implementation of hook_omniture_variables
+ * If ctools is in stalled find all omniture_plugin_variables plugins 
+ * combine vars from there callback function and return a master vars
+ */
+function omniture_omniture_variables($main) {
+  if (module_exists('ctools')) {
+    ctools_include('plugins');
+    $plugins = ctools_get_plugins('omniture','plugin_variables'); 
+    $vars = array('variables'=>array());
+    foreach ($plugins as $plugin) {
+      //check for $callback function default to MODULE_PLUGINNAME_omniture_variables
+      $callback = $plugin['callback'] ? $plugin['callback'] : $plugin['module'].'_'.$plugin['name'].'_omniture_variables';
+      if (function_exists($callback)) {
+        $plugin_vars = $callback($main);
+        if (array_key_exists('header', $plugin_vars)) {
+          // If there is a header override any one that we currently have
+          $vars['header'] = $plugin_vars['header'];
+        }
+        if (array_key_exists('footer', $plugin_vars)) {
+          // If there is a footer override any one that we currently have
+          $vars['footer'] = $plugin_vars['header'];
+        }
+        if (array_key_exists('variables', $plugin_vars)) {
+          //update the variablesarray
+          $vars['variables'] = array_merge($vars['variables'], $plugin_vars['variables']);
+        }
+      }
+    }
+    return $vars;
+  }
+}
 
 /**
  * Example output from the omniture.com site itself.
