If your site receives lots of traffic, you might want to distribute your “RUX credits” so you don’t run out of credits early in the month.
You can do this by defining a sample rate. The sample rate determines how often we should collect data.
Choose a value between 0 and 1 (no more than two decimals). A sample rate of 0 will never collect data, and a sample rate of 1 will collect everything.
The default sample rate is 1.
If you only want to track every second page view, you set your sample rate to 0.5 (meaning 50%). If you wish to track every fourth page view, you set your sample rate to 0.25 (meaning 25%).
Example of sample rate and its effect:
|50% (0.5) sample rate||7.500||5.000||7.500||6.250||4.000|
|25% (0.25) sample rate||3.750||2.500||3.750||3.125||2.000|
|10% (0.1) sample rate||1.500||1.000||1.500||1.250||800|
|1% (0.01) sample rate||150||100||150||125||80|
How to implement a sample rate
To get the sample rate to work, you need to modify your tracking script.
Insert this snippet of code into your current tracking script and change the value (after the equal sign and inside the quotes) to the sample rate you wish.
Example regular script:
For Google Tag Manager the setup is a bit different. See the example below:
Google Tag Manager Script:
You need to change the value inside the single quotes on the last line, where it says ‘0.5’.