public function addGoal($idSite, $name, $matchAttribute, $pattern, $patternType, $caseSensitive = false, $revenue = false, $allowMultipleConversionsPerVisit = false, $description = '')
{
Piwik::checkUserHasAdminAccess($idSite);
$this->checkPatternIsValid($patternType, $pattern, $matchAttribute);
$name = $this->checkName($name);
$pattern = $this->checkPattern($pattern);
$description = $this->checkDescription($description);
$revenue = Common::forceDotAsSeparatorForDecimalPoint((double) $revenue);
$goal = array('name' => $name, 'description' => $description, 'match_attribute' => $matchAttribute, 'pattern' => $pattern, 'pattern_type' => $patternType, 'case_sensitive' => (int) $caseSensitive, 'allow_multiple' => (int) $allowMultipleConversionsPerVisit, 'revenue' => $revenue, 'deleted' => 0);
$idGoal = $this->getModel()->createGoalForSite($idSite, $goal);
$this->getGoalsInfoStaticCache()->delete(self::getCacheId($idSite));
Cache::regenerateCacheWebsiteAttributes($idSite);
return $idGoal;
}