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
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | omniture-add_page_to_hook_omniture_variables-1287936-1.patch | 995 bytes | lucascaro |
Comments
Comment #1
lucascaro commentedThis seems like a good idea, here's a patch.
Comment #3
lucascaro commentedThat failed just because the testbot's disk was full...
Comment #4
bleen commentedLooks great!! Committed http://drupalcode.org/project/omniture.git/commit/8ae28beb7cef99109a0b21...