Analytics
Create goal
Create a new goal. Please note that each request must be authenticated.
post/api/analytics/v1/manage/goals/
Request
- Base URLhttps://example.piwik.pro
- AuthOAuth 2Client credentialsToken URL/auth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"data": {
"id": "dde2dc68-b6bb-45ee-9ac2-868b6181e33f",
"attributes": {
"website_id": "dde2dc68-b6bb-45ee-9ac2-868b6181e33f",
"name": "User entered contact page",
"description": "Goal is triggered when user enters contact page",
"trigger": "url",
"pattern_type": "contains",
"pattern": "Contact",
"revenue": "10.22"
}
}
}Response
OK
Example response
{
"data": {
"id": "dde2dc68-b6bb-45ee-9ac2-868b6181e33f",
"attributes": {
"website_id": "dde2dc68-b6bb-45ee-9ac2-868b6181e33f",
"name": "User entered contact page",
"description": "Goal is triggered when user enters contact page",
"trigger": "url",
"pattern_type": "contains",
"pattern": "Contact",
"revenue": "10.22"
}
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.