Can't get plugin configuration in the Tracker hook

I’m newbie of piwik, writing a tracker plugin.

The plugin has one admin page which saves some settings for the plugin, and 2 registered hooks.
The admin page works fine. I can save and restore all setting values for the plugin correctly. (via Zend_Registry)

But I can’t get the setting values in the ‘Tracker.Action.record’ hook.
I can’t even call ‘Zend_Registry::get’ static method.
So I changed all code using Zend_Registry to using Piwik_Plugin_Config class but it doesn’t work as well.

The really wierd thing is that it works if I set $GLOBALS[‘PIWIK_TRACKER_DEBUG’] = true in the piwik.php.

the plugin code below :

public function getInformation() {
return array(
‘description’ => Piwik_Translate(‘TrackerHook_PluginDescription’),
‘author’ => ‘Data Lab’,
‘version’ => ‘0.1’,
‘TrackerPlugin’ => true,

function getListHooksRegistered()
$hooks = array(
‘AdminMenu.add’ => ‘addMenu’,
‘Tracker.Action.record’ => ‘onRecord’,
return $hooks;

function onRecord($notification)
$record = $notification->getNotificationInfo();
$c = new Piwik_Plugin_Config(‘TrackerHook’); //got internal server error without $GLOBALS[‘PIWIK_TRACKER_DEBUG’] = true
$config = $c->load();


I don’t know what’s going on…
please give me any clue~