Server-side API
The server-side API lets you send off-site conversion events to Webflow over HTTPS. Use this API to attribute conversions that happen outside your website (product signups, CRM actions, in-person sales) back to the optimizations visitors viewed.
Set the user ID first
Before sending a server-side event, ensure you’ve called wf.setUserId() on the client side to identify the visitor.
Endpoint
Authentication
Include your authorization token in the Authorization header:
The apiKey is the off-site conversion authorization token generated from the Insights > Tracking Settings page. Click here to learn more.
Request format
Request body fields
Response format
A successful request returns:
Example request
Testing with curl
Once your setup is complete, use a curl command to test your integration.
On macOS/Linux:
On Windows (Command Prompt):
Replace each backslash (\) with a caret (^).
If the request is successful, the command line returns the data you submitted.
Formatting actionTimestamp
The actionTimestamp field must be in UTC and formatted as UNIX time in milliseconds.
Example
- UTC time: May 25, 2022 21:30:58
- UNIX time: 1653514258136
Common timestamp issues
Conversions may be ignored or attributed incorrectly when:
- The timestamp is in the wrong format (must be formatted as UNIX time in milliseconds)
- The timestamp is not in UTC (if the timestamp is in local time, convert it to UTC before formatting as UNIX)
- The timestamp is after the API call is made
- The timestamp is older than 2 days
Attribution requirements
For an off-site conversion to be attributed to an optimization, these conditions must be met:
The eventName must match at the time of conversion
The eventName in the request must exactly match the eventName of a custom goal that existed when the conversion occurred. Attribution won’t happen if:
- The custom goal was created after the conversion’s timestamp
- The custom goal had a different
eventNamewhen the conversion happened (even if renamed later)
The conversion must fall within the attribution window
- The view event (when the visitor saw the variation) must occur before the conversion timestamp
- The conversion must happen during the same session:
- Before the session expired due to 30 minutes of inactivity, OR
- Before the 24-hour maximum session timeout
When off-site conversions import
Off-site conversions are imported in batches each night at midnight UTC.
This means:
- Stats for the current day won’t include new off-site conversions yet
- Once the nightly import runs, conversions appear with their actual timestamps
- Data for previous date ranges may change as new conversions are imported