API Reference
Create Goal
Record a custom goal event for a visitor
POST
https://analytics.flowsery.com/goalsRecord a custom goal event for a given visitor.
Bearer Token (API key)
Request body
| Parameter | Type | Description |
|---|---|---|
visitorUid | string | The Flowsery Analytics visitor ID. This value is stored in the _fs_vid browser cookie, making it accessible from your server-side endpoints. |
nameREQUIRED | string | Goal name (lowercase letters, numbers, underscores, and hyphens; max 64 characters). |
metadata | object | Custom key-value pairs to enrich the event. Up to 10 parameters per event. |
Metadata field rules
<strong>Keys:</strong> Only lowercase letters, numbers, underscores (_), and hyphens (-). Max 64 characters.
<strong>Values:</strong> Any string up to 255 characters. HTML and script content is stripped automatically for security.
<strong>Limit:</strong> Up to 10 custom parameters per event.
Visitor must have a pageview
The visitor must have at least one recorded pageview before a goal can be created. A 404 is returned when no pageview exists for the visitor.Error responses
<strong>400 Bad Request</strong> -- Returned when the visitor is identified as a bot.
<strong>404 Not Found</strong> -- Returned when no pageview exists for the given visitor.