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 |