Learn how to implement off-site conversion tracking to attribute conversions to optimizations.
Not every conversion happens on your site. Customers might sign up through your CRM, complete a purchase in-app, or convert somewhere else downstream. Off-site conversions let you connect those actions back to your site, so you can see which optimizations actually drove the results, even when the conversion itself happened elsewhere.
How off-site conversions work
First, you’ll need to generate an authorization token and create a custom goal in Optimize. Then, your developers need to configure Webflow’s APIs to send off-site conversions back to Optimize that will be attributed to your custom goal.
Here's the big picture of how it will all work:
- A visitor comes to your site
- The client-side API captures their user ID
- Later, the person converts off-site (e.g., over the phone, in person, etc.)
- Your backend triggers the server-side API to send that conversion info to Optimize
- Optimize validates the data (e.g., valid authorization token, timestamps, etc.)
- Verified conversion data gets attributed to the optimizations the person viewed on your site
Note
Off-site conversions import in nightly batches, so a conversion may not show up in the results until the following day.
Configuring your Optimize site
Before you get started
You need admin permissions to configure your Optimize site.
Part one of the configuration is to prepare your Optimize site for off-site conversions tracking.
Generate an authorization token
First, you'll need to create an authorization token. This token acts like a security pass to ensure only approved data is recorded. Your dev team will append the token to every server-side API request. Don't share this token outside your organization.
Open your Optimize site in Webflow, then:
- Click Account settings in the Navigation panel
- Go to Off-site conversion goal token
- Click Create token
- Enter a name for the token
- Click Generate token
- Click the Copy icon to the right of the new token and send it to your dev team
Create a custom event
Events are how Optimize keeps track of conversions. You need to create custom events so that your devs can code their name apiName in to the server-side API requests. Create one custom event for each off-site conversion type you want to track.
-
Create a custom goal event and enter a unique
apiName(e.g.,application-accepted) - Copy the
apiNameyou created for each event and send it to your dev team
Add custom goals to optimizations
Any optimization that can have an off-site conversion will need to be updated so that its goal leverages the custom event(s) you created. This allows the off-site conversion to be attributed to your optimizations.
- Edit an optimization
-
Add a custom goal
- Use the Select event dropdown to choose a custom event you created
- Click Set this as primary goal if you want to Optimize for these off-site conversions
Configuration work for your dev team
Part two of the configuration is for your dev team to configure the backend systems to send off-site conversions to Optimize.
Important
Every off-site conversion tracking setup is different. Your exact configuration will depend on the tools you use and how your systems are integrated. Use the following info as foundational building blocks to get you started.
Developers, you'll need to leverage our client-side API to assign a user ID to each visitor and leverage our server-side API to gather and send conversion info from your "off-site" systems to Optimize.
Before you get started, you'll need the following info to configure the APIs:
- The Optimize authorization token
- The Optimize custom event
apiName(s) - Your Optimize Account ID (from the site's Account settings)
Additionally, if you're using third-party tools like Salesforce or Marketo, you may need to create triggers or logic to know when to send conversion events.
Once everything is configured, you can test functionality using a curl command.
Client-side API
setUserId() is exposed by the snippet in the browser. It tells Optimize who the visitor is by passing a user ID.
The value you use for the ID depends on the system where your user data lives (e.g., an in-house database, Salesforce, Marketo, etc.). If your IDs include Personally Identifiable Information, use a one-way hash and send the hashed value.
To attribute a conversion, the user ID for a visitor must be passed to Optimize before any related off-site events are sent.
Syntax:
intellimize.setUserId( userDomain: string, userId: string ) => void;
Important
All API calls must be wrapped in a .ready() callback.
Example:
intellimize.ready(function() {
intellimize.setUserId("salesforce", "72349876");
});Server-side API
This server-side HTTP API communicates over HTTPS to send conversion events to Optimize.
HTTPS request format:
POST /event HTTP/1.1
Host: log.intellimize.co
Authorization: ApiKey ${apiKey}
{
customerId: string, // your Optimize account ID found in Account Settings
apiName: string, // API name for the Optimize custom event
userDomain: string, // e.g., "salesforce"
userId: string, // user ID tied to the domain
actionId: string, // unique ID for the conversion
actionTimestamp: number, // UTC time the converssion occurred in UNIX milliseconds
value?: number // optional monetary value
}Note
• customerId — your Optimize account ID
• ApiKey — is the Optimize site authorization token
• actionTimestamp — must be in UTC and formatted as UNIX time (in milliseconds)
HTTPS response format:
HTTP/1.1 200 OK
Example request:
POST /event HTTP/1.1
Host: log.intellimize.co
Authorization: ApiKey AbCdEf123456
{
customerId: "123456789",
apiName: "application-accepted",
userDomain: "salesforce",
userId: "72349876",
actionId: "23823940",
actionTimestamp: 1578316150000,
value: 149.99
}Test your configuration with curl
Once your setup is complete, use a curl command to test your server-side API integration. Learn more about curl.
- Verifies your Optimize authorization token is working
- Verifies your off-site conversion data is being received correctly
Where to run the command:
- Mac: Open Terminal (Applications > Utilities > Terminal)
- Windows: Open Command Prompt (Start > Windows System > Command Prompt)
Run the following curl command with your real values (e.g., your actual account ID, apiName, etc.).
Note
This example is written for the MacOS. In UNIX systems, the backslash (\) is used to break long commands into multiple lines. On Windows, replace each backslash with a caret (^).
curl --location --request POST 'https://log.intellimize.co/event' \
--header 'Authorization: ApiKey ${apiKey}' \
--header 'Content-Type: application/json' \
--data-raw '{
customerId: "your-account-id",
apiName: "your-event-name",
userDomain: "your-user-domain",
userId: "user-id-from-client-side",
actionId: "unique-conversion-id",
actionTimestamp: 1653514258136,
value: 149.99
}'Example:
curl --location --request POST 'https://log.intellimize.co/event' \
--header 'Authorization: ApiKey AbCdEf123456' \
--header 'Content-Type: application/json' \
--data-raw '{
customerId: "123456789",
apiName: "application-accepted",
userDomain: "salesforce",
userId: "72349876",
actionId: "23823940",
actionTimestamp: 1578316150000,
value: 149.99
}'Note
If the request is successful, the command line will return the data you submitted.
Additional information
Formatting actionTimestamp correctly
The actionTimestamp field in server-side API calls must be in UTC and formatted as UNIX time in milliseconds.
Conversions may be ignored or attributed incorrectly when:
- The timestamp is in the wrong format
- The timestamp occurs after the server-side API call is made
- The timestamp is older than 7 days
What is UTC time?
UTC (Coordinated Universal Time) is a global time standard used to measure time consistently across different regions. If your timestamps are currently in local time — either your time zone or your server's — they need to be converted to UTC.
What is UNIX time?
UNIX time counts the number of seconds since 00:00:00 UTC on January 1, 1970 (known as the UNIX Epoch). It's a standardized format that doesn't change based on location.
UNIX time is represented as a numeric string. For example, both lines below refer to the same moment in time:
- UTC time — May 25, 2022 21:30:58
- UNIX time — 1653514258136
Pro tip
You can use savvytime.com to check the time difference between your local time and UTC. Currentmillis.com lets you check your current time in UTC and UNIX, or convert from local to UNIX in milliseconds.
Variation attribution requirements
For an off-site conversion to be attributed to a variation a visitor saw, the following two key conditions must be met.
The apiName must match at the time of the conversion
The apiName in the off-site conversion must exactly match the apiName of an event that existed at the time the conversion occurred. Attribution will not happen if:
- The event was created after the conversion's timestamp
- The event had a different
apiNamewhen the conversion happened, even if it was renamed later to match
The conversion must fall within the attribution window
- The view event (when the visitor saw the variation) must occur before the off-site conversion's timestamp
- The off-site conversion must happen during the same session — either:
- Before the session expired due to 30 minutes of inactivity
- Or before the session hit the 24-hour maximum timeout
When off-site conversions import
Client-side conversions are recorded in real time. Off-site conversions, however, are imported in batches each night at midnight UTC. This means stats for the current day won't yet include any new off-site conversions.
Once the nightly batch import runs, the off-site conversions will appear in your optimization results, timestamped according to when the conversions actually occurred. Because of this, data for previous date ranges may change from day to day as new conversions are imported and results are recalculated.
Example config for credit card signups
In this example, a visitor fills out a form on your website to apply for a credit card. However, the actual conversion — approval — happens later, after a review process.
This setup is similar to a typical client-side experience, but since the final conversion happens off-site, you'll need to configure both the client-side and server-side APIs to track it properly.
Example of setting the user ID with the client-side API:
Use the setUserId() call to pass the user's identity to Webflow Optimize. Be sure to use an ID that's available on both the client and server sides — e.g., an account ID or unique application ID.
intellimize.ready(function() {
intellimize.setUserId("applicationId", "123456789");
});Example of sending the goal event with the server-side API:
To report the off-site conversion, send a POST request to the Webflow Optimize server-side API as shown below.
POST /customer/123456789/event
Host: log.intellimize.co
Authorization: ApiKey AbCdEf123456
{
eventName: "application-accepted",
userDomain: "applicationId",
userId: "123456789",
actionId: "23823940",
actionTimestamp: 1578316150,
value: 149.99
}