SpeedCurve's RUM product, LUX, includes numerous metrics collected from real user web pages such as page load time, DNS lookup time, DOM size, etc. It also records User Timing marks and measures. But sometimes there's other information specific to your site that you would like to track.
This additional data that is specific to your website is called Customer Data. Examples include:
- Business metrics such as cart size and conversion information.
- Performance metrics such as download time for specific resources or number of search results.
- A/B testing information such as the name of the test bucket.
- User information such as account ID or username.
You can add Customer Data to LUX by using the LUX.addData API:
The examples listed above could be captured like this:
Protip: The values you assign to the customer data variables are used in your charts, so choose values that are going to be most intuitive to your organization. For example, you might have a boolean variable "logged_in". Using "true" and "false" might seem logical but "yes" and "no" would probably be more easily understood by most people reading the chart.
Adding Customer Data to Settings
- Go to Settings.
- Click "Add Custom Metric".
- Enter a human-readable name, such as "Cart Size" or "Button Color AB Test".
- Enter the Customer Data variable. This is the name you used in LUX.addData(), e.g., "cartsize" or "abtest_buttoncolor".
- Select the "Customer Data" radio button.
- Choose the "type" for this Customer Data variable (as explained next).
Determining the Customer Data "type" depends on whether you want to plot the variable or use it for segmenting your data:
- If you want to plot the Customer Data variable, choose "Seconds", "Milliseconds", or "Currency". From our previous examples, we would choose "Currency" for
cartsizeand "Milliseconds" for
- If you want to use the Customer Data variable for segmenting, choose "Other". For example, you would choose "Other" for
abtest_buttoncolorbecause you want to segment your data based on test bucket, e.g., page load times split out by button color "blue" versus "red". Similarly, you would choose "Other" for
usernameso you could see performance data for specific users.
Using Customer Data
Customer Data variables setup for plotting (with types "Seconds", "Milliseconds", or "Currency") show up in the list of metrics in Favorites in the "Custom Metrics" section. You can select them just like any other metric to generate new, custom charts. For example, you might create a chart that plots "Cart Size" and "Page Load" to see if faster pages generate more revenue.
Customer Data variables setup for segmenting (with type "Other") show up in the Favorites and LUX dashboards under "Customer Data". You can choose the variable name (e.g., "Button Color AB Test") and choose from the set of possible values.
Note that after adding a new variable it can take up to 24 hours before it is available as an option in the SpeedCurve dashboards.