public function detectGoalsMatchingUrl($idSite, $action)
    {
        if (!Common::isGoalPluginEnabled()) {
            return array();
        }

        $goals = $this->getGoalDefinitions($idSite);

        $convertedGoals = array();
        foreach ($goals as $goal) {
            $convertedUrl = $this->detectGoalMatch($goal, $action);
            if (!is_null($convertedUrl)) {
                $convertedGoals[] = array('url' => $convertedUrl) + $goal;
            }
        }
        return $convertedGoals;
    }
public function detectGoalsMatchingUrl($idSite, $action)
    {
        if (!Common::isGoalPluginEnabled()) {
            return array();
        }

        $goals = $this->getGoalDefinitions($idSite);

        $convertedGoals = array();
        foreach ($goals as $goal) {
            $convertedUrl = $this->detectGoalMatch($goal, $action);
            if (!is_null($convertedUrl)) {
                $convertedGoals[] = array('url' => $convertedUrl) + $goal;
            }
        }
        return $convertedGoals;
    }
public function detectGoalsMatchingUrl ( $ idSite , $ action ) { if ( ! Common :: isGoalPluginEnabled ( ) ) { return array ( ) ; } $ goals = $ this -> getGoalDefinitions ( $ idSite ) ; $ convertedGoals = array ( ) ; foreach ( $ goals as $ goal ) { $ convertedUrl = $ this -> detectGoalMatch ( $ goal , $ action ) ; if ( ! is_null ( $ convertedUrl ) ) { $ convertedGoals [ ] = array ( 'url' => $ convertedUrl ) + $ goal ; } } return $ convertedGoals ; }
Look at the URL or Page Title and sees if it matches any existing Goal definition

@param int $idSite
@param Action $action
@throws Exception
@return array[] Goals matched
Look at the URL or Page Title and sees if it matches any existing Goal definition