Some errors in the name of hook of plugins


(cn_Dark) #1

Hello,

I find some errors in the document.
http://dev.piwik.org/trac/wiki/Plugins/Hooks
The hooks “Piwik_Tracker_Visit.isExcluded” and “Piwik_Tracker_Visit.newVisitorInformation” don’t run, I find I need to change the names to run it.
Piwik_Tracker_Visit.isExcluded -> Tracker.Visit.isExcluded
Piwik_Tracker_Visit.newVisitorInformation -> Tracker.newVisitorInformation

Maybe some other hooks also have this problem. We can find the correct name in the source.
eg: Piwik_Tracker_Visit.isExcluded -> Tracker.Visit.isExcluded

 protected function isExcluded()
    {
        $excluded = 0;
        Piwik_PostEvent('Tracker.Visit.isExcluded', $excluded);
       if($excluded)
        {
          printDebug("Visitor excluded.");
            return true;
        }
       
        return false;
    }

We can find the correct name in “Piwik_PostEvent(‘Tracker.Visit.isExcluded’,$excluded)”.


(vipsoft) #2

Thanks. I’ve updated the documentation.