sendEvent()
sendEvent()
sendEvent()
wf.sendEvent(eventName, options?)Trigger a custom goal to track conversions on your Webflow site.
Before calling wf.sendEvent(), create a custom goal. Then, pass the eventName from the custom goal to this method.
eventName (required): string — The name of the custom event you created in your custom goal. Must be 40 printable ASCII characters or fewer, and cannot contain spaces.
options (optional): { value: number | string } — An object containing a value property for tracking monetary or numeric values with the conversion.
When including a value, it must meet these conditions:
10 is valid, -10 is not)10, 10.5, 10.50)10.50 is valid, $10.50 is not)To ensure two-decimal accuracy when working with dynamic values:
Track a simple on-site conversion:
Track an on-site conversion with an associated monetary value:
Track values that vary based on user action, such as a shopping cart total:
This method doesn’t return a value. The event is sent to Webflow and recorded in your optimization results.
Make sure you’ve:
eventName (case-sensitive) from the custom goal in your wf.sendEvent() callwf.ready() to ensure the Browser API is availableOn-site conversion events are recorded in real time and should appear in your Analyze/Optimize dashboard within approximately 15 - 30 minutes.