I’ve been trying a lot of different ways to add a manually triggered goal through the API, but I can’t seem to do it. The Goals.addGoal function doesn’t have any real documentation though…
/**
* Creates a Goal for a given website.
*
* @param int $idSite
* @param string $name
* @param string $matchAttribute 'url', 'title', 'file', 'external_website' or 'manually'
* @param string $pattern eg. purchase-confirmation.htm
* @param string $patternType 'regex', 'contains', 'exact'
* @param bool $caseSensitive
* @param bool|float $revenue If set, default revenue to assign to conversions
* @param bool $allowMultipleConversionsPerVisit 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)
* @return int ID of the new goal
*/