API Reference

Create Goal

Record a custom goal event for a visitor

POSThttps://analytics.flowsery.com/goals

Record a custom goal event for a given visitor.

Bearer Token (API key)

Request body

ParameterTypeDescription
visitorUidstringThe Flowsery Analytics visitor ID. This value is stored in the _fs_vid browser cookie, making it accessible from your server-side endpoints.
nameREQUIREDstringGoal name (lowercase letters, numbers, underscores, and hyphens; max 64 characters).
metadataobjectCustom 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.