LUX is SpeedCurve's RUM product. Your LUX plan comes with a budget, typically 10 million page views per month. You can buy smaller and larger plans to fit your needs, and we can even pro-rate additional bundles of page views if you decide you need more budget part way through your annual plan.

Unlike some other RUM services, LUX allows you to control how many page views are sampled. This allows you to monitor your pages while staying within a reasonable budget. 

There are two ways to set your sample rate: in your Settings and with the LUX API.

Using the sample rate in Settings

In your Settings you can click on "Edit LUX" to change your sample rate. You can enter any integer (no decimals) from 0 to 100 inclusive.

This approach to setting the sample rate is easy for making changes since no code changes are necessary. However, the changes do not take effect immediately. When decreasing the sample rate, it can take as long as 15 minutes for the changes to propagate across the LUX servers. When increasing the sample rate, the change depends on whether the real user has lux.js in their browser cache. It can take up to a week for all copies of lux.js to be purged from real user's caches, but typically it takes 1-2 days.

Using the LUX API

The other way to set your sample rate is using LUX.samplerate from the LUX API. For example:

LUX.samplerate = 40;

This approach is more work as it requires a change to your site's JavaScript. However, once you push the change it takes effect immediately. 

In addition, LUX's approach of letting you set the sample rate in your code gives you a lot of flexibility because you can vary the sample rate on every page. Here are some scenarios where this is useful:

  • If you have multiple properties or products (e.g., marketing pages, customer pages, and support docs) you can vary ``LUX.samplerate depending on the type of page. You might want to have a higher sample rate for customer pages where the content varies depending on the specific user, and have a lower sample rate on the marketing and support pages where the content is more static.
  • If your product is used across multiple countries, you might want to have a higher sample rate for countries that have less traffic so that you have enough data to get statistically sound results.
  • If you're running an A/B test on a small subset (e.g., 0.1%) of users, you might want to collect 100% of that traffic in order to compare the different test cases.

NOTE: If you use both Settings and LUX.samplerate, the value in Settings takes precedence. In other words, if you set sample rate to 40 in Settings and 35 with LUX.samplerate, the sample rate that is used is 40%.

Did this answer your question?