4. 🖥️ Configuring Data Collection

These settings for the JaJuMa Real User Monitoring (RUM) extension for Magento 2 control precisely how, when, and from whom the tracker script collects performance data from your user's browsers.
Properly configuring this section is key to balancing data accuracy with optimal performance.

Real User Monitoring Data Collection Configuration

4.1 📥 Standard vs. Standalone Tracker Script

The extension offers two methods for deploying the data collection script.
The choice involves a trade-off between ease of setup and maximum performance isolation, which is critical for high-traffic sites.

Method Description Performance Impact Best Use Case
Standard (Integrated) Injects the tracker via Magento's standard layout system. This is the default and requires no extra setup. Minimal, but the data collection endpoint shares resources with the main Magento application. Staging environments or low-traffic stores where simplicity is the priority.
Standalone Script Offloads the data collection endpoint to a separate PHP script, isolating it from the main Magento application thread. Negligible. This method protects your core application from being impacted by high volumes of monitoring traffic. Recommended for all production sites, especially high-traffic stores.

The following fields control this behavior:

  • Use Standalone Tracker Script:
    Set to Yes to enable the high-performance standalone method.
  • Download Standalone Tracker Script:
    Provides a link to download the rum_tracker.php script template.
  • Standalone Tracker Script URL:
    The public URL where you will host the rum_tracker.php script.

4.1.1 Setting Up the Standalone Script

Follow these steps to configure the standalone script on your server:

  1. From the configuration screen, download the rum_tracker.php file.
  2. Using FTP or SSH, copy the downloaded file to your Magento pub directory: /magento_root/pub/.
  3. Ensure your webserver configuration allows direct execution of this PHP file.
    • Apache: No additional configuration is usually needed.
    • Nginx: You must add a specific location block to your virtual host configuration to process the script correctly.

⚠️ Warning:
The example Nginx configuration below is a guideline.
Your specific server setup may require modifications.
We do not provide free support for individual server environment configurations.

# Example Nginx Configuration
location = /rum_tracker.php {
    try_files /rum_tracker.php =404;
    fastcgi_pass fastcgi_backend;
    fastcgi_buffers 16 16k;
    fastcgi_buffer_size 32k;
    fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
    fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=18000";
    fastcgi_read_timeout 600s;
    fastcgi_connect_timeout 600s;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
}

4.2 🕐 Optimizing Data Collection Timing

  • Collect Data Only After User Interaction
    This setting defers the execution of the RUM script until a user interacts with the page (e.g., clicks, scrolls, or types).

    Why this matters:
    This is a critical performance feature. By selecting Yes, you ensure that the monitoring script itself has zero impact on initial page load metrics like LCP and FCP. This protects your Core Web Vitals scores from being skewed by the monitoring tool and is the recommended setting for all stores.

4.3 📊 Managing Data Volume

These settings allow you to control the amount of data collected, which is essential for managing server resources on high-traffic stores.

  • Sampling
    Enter a percentage (from 1 to 100) of page views for which RUM data should be collected.

    Why this matters:
    For very high-traffic stores, collecting data on 100% of page views can generate a large volume of raw data. By setting a lower percentage (e.g., 20), you can gather a statistically significant sample of data that accurately reflects overall user experience while reducing the load on your server for data processing. For most stores, 100 is the ideal setting.

  • Collect data time limit
    Set a time limit in seconds after the initial page load within which data will be collected. Set to 0 for no limit.

    Why this matters:
    This setting improves data quality by preventing skewed metrics from unusually long-running sessions (e.g., a browser tab left open for hours). A reasonable limit (e.g., 300 seconds) ensures you capture all relevant performance data from an active user session.

  • Enable IP Rate Limiting
    This feature limits the number of reports that can be submitted from a single IP address within a specified time window.

    Why this matters:
    This acts as a safeguard against data flooding. It can prevent a single user, bot, or developer running tests from submitting an excessive number of reports that could skew your data or overload the collection endpoint.

📞 Need Help?

Still have questions or need help with your configuration? Our expert team is here to assist. Please don't hesitate to contact our support team for personalized assistance.


Ready to unlock these features for your store?

The JaJuMa Real User Monitoring (RUM) Extension is the all-in-one solution for a faster, more stable, and higher-ranking Magento store.



Find all you need to know and more valuable insights about Hyvä and Magento.
Expertly curated by JaJuMa:

🚀 Launch the JaJuMa Hyväverse

Your central resource for everything Hyvä.

Explore the Magento Metropolis!

Your central resource for everything Magento.



Do you find all information about us and our services?

thumb-up
thumb-down