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:

LUX.addData(name, value);

The examples listed above could be captured like this:

LUX.addData('cartsize', 128);
LUX.addData('jsonresptime', 744);
LUX.addData('abtest_buttoncolor', 'blue');
LUX.addData('username', 'steve_souders');

Adding Customer Data to Settings

Once you've added the LUX.addData JavaScript to your pages, as shown in the previous examples, the next step is to add them to your Settings:

  1. Go to Settings.
  2. Click "Add Custom Metric".
  3. Enter a human-readable name, such as "Cart Size" or "Button Color AB Test".
  4. Enter the Customer Data variable. This is the name you used in LUX.addData(), e.g., "cartsize" or "abtest_buttoncolor".
  5. Select the "Customer Data" radio button.
  6. 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 cartsize and "Milliseconds" for jsonresptime.
  • If you want to use the Customer Data variable for segmenting, choose "Other". For example, you would choose "Other" for abtest_buttoncolor because 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 username so 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.


Did this answer your question?