When using an old-style .theme file instead of a templating engine, the javascript for outgoing link tracking doesn't work because the module settings are not available to javascript.
The problem is that the settings are added by hook_footer(), but it adds the settings to the "header" scope:
drupal_add_js(array('googleanalytics' => $link_settings), 'setting', 'header');
This is no problem for templates because they gather all variables before starting to render the page. However, .theme files have already printed the header scripts by the time that hook is invoked, so these settings are never added to the page.
This should be reproducible with the chameleon theme from core.
Fix is to either move that code to another hook, or add the settings to the footer instead.
Comments
Comment #1
hass commentedVerified. Settings are missing in Chameleon 5.x, but not in 6.x. In D6 I've moved this to hook_init(), but the problem is that D5 hook_init works different here and we need to move this inside hook_menu. I don't like this very much, but i see the issue... :-(
Comment #2
hass commentedPatch attached will solve the issue. Please review and test.
Comment #3
hass commentedFixed in latest DEV
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.