Handle submission callbacks

After the server accepts a submission, the embed dispatches a siv:form:submitted CustomEvent on the parent window. The embed dispatches the event before it starts a configured redirect.

Add a listener

Register the listener before a visitor can submit the form:

Event data

The callback data uses the following stable version 1 schema:

FieldTypeValue
version1The callback contract version.
formIdstringThe submitted Siv form ID.
eventName"Lead"The conversion event name.
eventIdstringA unique ID in the form siv-form:<submission-id>.
occurredAtstringThe server-recorded submission time in ISO 8601 format.

The callback intentionally excludes lead names, email addresses, phone numbers, and answers. Treat it as an event notification rather than authorization to expose private submission data.

Delivery and deduplication

The callback uses at-least-once delivery. The embed suppresses recently seen duplicate event IDs. Your listener must also deduplicate by eventId before it performs an irreversible action.

Send a Google Analytics 4 event

Keep event_id so downstream analytics or tag manager logic can recognize a retry.

Send a data layer event

Do not add API keys, access tokens, or lead data to browser callback code.