Hi Guys,

In omniture.module, when it calls out for additional variables, it sort of expects submodules to figure out what stuff to add on their own (eg if you want to track by user, use "global $user"). Some modules might need data from the page itself, so it would be helpful if the hook passed in the $page variable while omniture_page_alter(&$page) is being run. here's the before & after code:

  if ($omniture_hooked_vars = module_invoke_all('omniture_variables')) {
    if (isset($omniture_hooked_vars['header'])) {
      $header = $omniture_hooked_vars['header'];
    }
...

after:

  if ($omniture_hooked_vars = module_invoke_all('omniture_variables', $page)) {
    if (isset($omniture_hooked_vars['header'])) {
      $header = $omniture_hooked_vars['header'];
    }
...

this should help to easily apply even more data to the omniture variables.
-Chris

PS: patch to follow

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lucascaro’s picture

Status: Active » Needs review
FileSize
995 bytes

This seems like a good idea, here's a patch.

Status: Needs review » Needs work

The last submitted patch, omniture-add_page_to_hook_omniture_variables-1287936-1.patch, failed testing.

lucascaro’s picture

Status: Needs work » Needs review

That failed just because the testbot's disk was full...

bleen’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.