public function getListHooksRegistered()
{
return array(
‘Tracker.saveVisitorInformation’ => ‘StageOne’,
);
}
function StageOne($notification)
{
$visitorInfo =& $notification->getNotificationObject();
// High priority targets.
$ip = "test";
//$sql = "SELECT * FROM " . Piwik_Common::prefixTable('log_visit');
//$output = Piwik_FetchAll($sql);
$visitorInfo['Algo_Test'] = $ip;
}
In the above code when the SQL comments are uncommented the plugin will no longer work however when they are commented the plugin works as expected. This code is functional when part of a menu driven plugin. Is there a way to make it work in a hook?