This is a big question. If your site averages 5 million page views a day, and you monitor 100% of that traffic, things can get pricey pretty fast – especially during traffic surges. (You know this already if you've tried other RUM tools.)
Many of our LUX customers choose the Enterprise plan, which lets you monitor 10 million page views per month, while other customers add additional bundles of 10M page views to reach the level of traffic that's appropriate.
The number of page views needed depends on how much you drill down into the data. For example, if your site is fairly uniform - a single type of content, one main geographic region, no A/B testing - then a lower number of page views is probably sufficient. But if you have multiple types of content, target more than one country, are accessed from a variety of devices, and want to use LUX's A/B testing capabilities, you might need more page views in order to have enough data when drilling down.
How to set your LUX sample rate
Most RUM vendors don't have data sampling built into their product. We do. With the LUX snippet, you can adjust your sample rate using the
LUX.samplerate variable. But what's the right number?
Setting your LUX sample rate starts by knowing the number of monthly page views for your site. For example, suppose your site gets ~50 million page views per month. If you want to stick with the basic Enterprise plan you would set
LUX.samplerate=20 to match the 10 million page views budget. (In fact, you might want to set
LUX.samplerate=15 to allow some wiggle room for any spikes you might experience during the month and growth over the year.)
As you use the LUX dashboards, if you find that your drilling down to where the number of page views is too low (e.g., less than 1000 per data point), then you might want to increase your budget by adding an additional bundle of 10M page views. Then with a budget of 20 million page views, you could set
LUX.samplerate=40 (or 35 to be safe).
Varying the sample rate
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.sampleratedepending 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.
If you have any questions about calculating sample rate, let us know at email@example.com and we'll be happy to help.