Send a server-side event through the same intake endpoint used by the browser tracker.
-
Set the instance URL and the site’s public ID.
Terminal window export SUPERMETRY_URL="https://analytics.example.com"export SUPERMETRY_SITE="my-site" -
Submit a custom event.
Terminal window curl --fail-with-body -X POST "$SUPERMETRY_URL/api/public/v1/events" \-H "Content-Type: application/json" \-H "User-Agent: Mozilla/5.0" \--data "{\"site\":\"$SUPERMETRY_SITE\",\"name\":\"Signup\",\"url\":\"https://www.example.com/signup\",\"props\":{\"plan\":\"pro\"}}" -
When sending on behalf of a visitor, forward the original
User-Agent. ForwardX-Forwarded-Foronly through a proxy included inSUPERMETRY_TRUSTED_PROXIES; Supermetry uses these values for session and device processing but does not store them. -
Do not add an API key. Event intake is public, but allowed hosts, exclusion rules, bot filtering and rate limits still apply.
What you should see: an empty response with HTTP status 202 Accepted; the custom event then appears in the site’s events view.