addGoal() public method

Creates a Goal for a given website.
public addGoal ( integer $idSite, string $name, string $matchAttribute, string $pattern, string $patternType, boolean $caseSensitive = false, boolean | float $revenue = false, boolean $allowMultipleConversionsPerVisit = false, string $description = '' ) : integer
$idSite integer
$name string
$matchAttribute string 'url', 'title', 'file', 'external_website', 'manually', 'event_action', 'event_category' or 'event_name'
$pattern string eg. purchase-confirmation.htm
$patternType string 'regex', 'contains', 'exact'
$caseSensitive boolean
$revenue boolean | float If set, default revenue to assign to conversions
$allowMultipleConversionsPerVisit boolean By default, multiple conversions in the same visit will only record the first conversion. If set to true, multiple conversions will all be recorded within a visit (useful for Ecommerce goals)
$description string
return integer ID of the new goal
コード例 #1
0
ファイル: APITest.php プロジェクト: GovanifY/piwik
 private function createAnyGoal()
 {
     return $this->api->addGoal($this->idSite, 'MyName1', 'event_action', 'test', 'exact');
 }