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

POST /event
Host: log.intellimize.co

Authentication

Include your authorization token in the Authorization header:

Authorization: ApiKey ${apiKey}

The apiKey is the off-site conversion authorization token generated from the Insights > Tracking Settings page. Click here to learn more.

Request format

1POST /event HTTP/1.1
2Host: log.intellimize.co
3Authorization: ApiKey ${apiKey}
4Content-Type: application/json
5
6{
7 "customerId": "string",
8 "eventName": "string",
9 "userDomain": "string",
10 "userId": "string",
11 "actionId": "string",
12 "actionTimestamp": number,
13 "value": number
14}

Request body fields

FieldTypeRequiredDescription
customerIdstringYesYour Analyze/Optimize Account ID (found in code preview snippet)
eventNamestringYesThe Event name of the custom goal you created
userDomainstringYesThe domain used in wf.setUserId() (e.g., salesforce)
userIdstringYesThe user ID passed to wf.setUserId()
actionIdstringYesA unique identifier for this specific conversion
actionTimestampnumberYesUTC time when the conversion occurred, in UNIX milliseconds
valuenumberNoOptional monetary value associated with the conversion

Response format

A successful request returns:

1HTTP/1.1 200 OK

Example request

1POST /event HTTP/1.1
2Host: log.intellimize.co
3Authorization: ApiKey AbCdEf123456
4Content-Type: application/json
5
6{
7 "customerId": "123456789",
8 "eventName": "application-accepted",
9 "userDomain": "salesforce",
10 "userId": "72349876",
11 "actionId": "23823940",
12 "actionTimestamp": 1578316150000,
13 "value": 149.99
14}

Testing with curl

Once your setup is complete, use a curl command to test your integration.

On macOS/Linux:

$curl --location --request POST 'https://log.intellimize.co/event' \
>--header 'Authorization: ApiKey ${apiKey}' \
>--header 'Content-Type: application/json' \
>--data-raw '{
> "customerId": "your-account-id",
> "eventName": "your_custom_goal_event_name",
> "userDomain": "your-user-domain",
> "userId": "user-id-from-client-side",
> "actionId": "unique-conversion-id",
> "actionTimestamp": 1653514258136,
> "value": 149.99
>}'

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:

1

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 eventName when the conversion happened (even if renamed later)
2

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