Installing the RUM Script
PerfBee's Real User Monitoring (RUM) provides insights into your website's performance as experienced by your actual visitors. Unlike lab data from synthetic tests, RUM captures real-world Core Web Vitals (CWV) metrics like LCP, CLS, and INP, giving you a holistic view of user experience. This helps you identify and fix performance bottlenecks that impact your audience.
Important: RUM is available on the Business plan and above. Free and Starter plan users will see an upgrade prompt.
Enabling RUM for Your Site
Before you can install the RUM script, you'll need to add your site to PerfBee in the My Sites section of your dashboard. There is no verification step: once the site is in My Sites, you can proceed with the installation. RUM is enabled per site.
Installation Instructions
Follow these steps to install the RUM script on your website:
-
Log in to your PerfBee dashboard: https://dashboard.perfbee.com
-
Open Real Users in the sidebar and select your site at the top right.
-
Click Enable RUM. This creates a unique
data-tokenfor the site and shows the script snippet. Copy the entire script snippet with the Copy button. -
Paste the script snippet into the HTML of your website, just before the closing
</body>tag, as the setup screen shows. The script loads withasyncanddefer, so it does not block page rendering. -
(Optional) Subresource Integrity (SRI): For enhanced security, especially in CSP-strict environments, you can tick Include SRI hash on the RUM setup screen. This adds an
integrityattribute to the script tag. When we updaterum.js, the hash changes and the script stops loading until you replace the snippet with the new one from the setup screen. -
Shopify Integration: If you're using Shopify, you can add the script tag directly through your Shopify admin panel (Online Store > Themes > Edit code > theme.liquid) before the closing
</body>tag.
Verifying Installation
Once you've installed the script, visit your site. The script sends its data when the visitor leaves the page or switches to another tab, so data appears shortly after the first visit. The setup screen shows "Waiting for first event…" and opens the dashboard when the first event arrives. Check Real Users in your PerfBee dashboard to view your real user metrics. You'll be able to see key performance indicators, breakdowns by device and browser, and LCP element attribution.
Important: The RUM script does not set cookies and does not collect user IDs, names or email addresses. It sends the Web Vitals timings, the browser, the device type (mobile or desktop), the connection type, the full page URL including any query string, the tag and file of the largest element, the URLs of files that failed to load, and JavaScript error messages. The visitor's country comes from our network provider; the IP address is not stored. Do not put personal data in page URLs.
If you have any questions, please consult our documentation: https://perfbee.com/docs.