You can use LUX to track your conversion rates in SpeedCurve. This opens up many possibilities, including being able to correlate conversions with performance metrics. In this example below, there is a strong correlation between conversion rate and page load time - that is, users with a faster page load time are more likely to convert.

How to track conversions

Conversions are tracked using LUX, SpeedCurve's real user monitoring solution. If you're not already using LUX, you can start a free trial in just a few simple steps.

To track a conversion, you must use the LUX.addData API at the point where a user has converted.

On a static page

You can track conversions on a static page like the order confirmation page by calling LUX.addData() anywhere on the page after the LUX snippet:

<script>
LUX.addData('order.confirmed', 1)
</script>

This data will be sent to SpeedCurve as part of the main LUX beacon.

As part of a single page transaction

You can also track conversions on pages where the conversion is triggered dynamically with JavaScript. For example after sending a POST request to finalise a transaction:

fetch('/transactions/confirm', { method: 'POST' }).then(response => {
    if (response.status === 200) {
        LUX.addData('order.confirmed', 1)
    }
})

If LUX.addData() is called after the main LUX beacon has been sent, then this data will be sent to SpeedCurve in a separate beacon. Otherwise it will be sent in the main beacon.

How to view conversion data in SpeedCurve

Once you have started sending conversion data using LUX.addData, you can view the data in SpeedCurve by creating a new custom metric:

  • Go to Settings.
  • Scroll down to the Custom Metrics section and click "Add Custom Metric".
  • Select "Customer Data" as the type of metric.
  • Select "Conversion" as the data type.
  • Specify the customer data variable name. In the examples above, this would be order.confirmed.
  • Pick a human-readable name, for example Order Confirmed.
  • Click "Save Custom Metric". 

After creating your conversion custom metric, you will see some new correlation charts at the top of your LUX Users dashboard. This metric will also be available to plot in your Favorites charts.

Tracking multiple conversion events

There's no limit to the number of conversion custom metrics you can create in SpeedCurve, so you can make your conversion events as granular as you like. Here are some examples of conversion events to track:

  • One conversion event for each step of a checkout process, to help you track where customers drop off.
  • When somebody creates an account.
  • When somebody uses a specific feature, like a search form.
Did this answer your question?