i What this module does
+BasicRum Analytics measures the real performance your visitors experience and + sends it to a collector you control, so you can see how fast your store actually is in the field — + not just in a lab.
+Real User Monitoring
+Loads the open-source Boomerang library to capture load time, ResourceTiming and + Continuity (responsiveness) metrics from every visitor.
Page-type tagging
+Every beacon is tagged with the page type (home, product,
+ checkout…) and p_gen=mage2 so you can segment in your dashboard.
CSP-safe by design
+Uses Magento's secure inline-script renderer and automatically whitelists your beacon host, so it + works on stores with Content-Security-Policy enforced.
1 Requirements
+On your store
+-
+
- Magento Open Source or Commerce 2.4.8 or newer +
- PHP 8.3 or 8.4 +
- Command-line access for
composerandbin/magento
+
Somewhere to send data
+A BasicRUM beacon endpoint — the URL of a running beacon + catcher/collector that receives the performance data.
+ +2 Installation
+Install through Composer (recommended), then enable the module and clear caches.
+-
+
-
+
Require the package
+
+composer require basicrum/basicrum-analytics
+ -
+
Enable the module
+
+bin/magento module:enable BasicRum_Analytics
+ -
+
Run the upgrade & clear caches
+
+bin/magento setup:upgrade +bin/magento cache:flushOn a production-mode store also run +
+bin/magento setup:di:compileand re-deploy static content.
+
3 Get your Beacon Endpoint (your "token")
+The Beacon Endpoint is the single most important setting. It is the address your visitors' + browsers send data to — think of it as your connection string.
+ +Self-hosted collector
+Run the open-source BasicRUM beacon catcher and copy the + URL it listens on. It usually looks like:
+https://rum.your-domain.com/beacon
+ Hosted / SaaS collector
+Your provider's dashboard gives you a ready-made URL. + If it includes a site key / token, keep it as part of the URL:
+https://collector.example.com/beacon?token=YOUR_TOKEN
+ &token=…. (You can still embed a token or ID directly in the Beacon Endpoint URL instead
+ if your collector expects a different format, e.g. an ID in the path.) A self-hosted BasicRUM catcher
+ usually needs no token at all — leave it blank.4 Configure in the Admin
+-
+
Open the settings
+Log in to the Magento Admin and go to + Stores → Configuration → BasicRum → BasicRum Analytics.
+ Enable the module
+Set Enable to Yes. (Nothing is injected on the storefront until this is on.)
+ Paste your Beacon Endpoint
+Put the full URL from step 3 into Beacon Endpoint. It must be a valid URL — the + field validates this on save.
+
+ Add your token (optional)
+If your collector needs one, paste it into Beacon Token / Site Key. It is stored + encrypted and appended to the beacon URL automatically. Leave blank for a self-hosted catcher.
+ Save & flush
+Click Save Config, then flush the cache from + System → Cache Management (or run
bin/magento cache:flush).
+
5 Content Security Policy
+Magento 2.4+ can enforce a Content-Security-Policy that blocks requests to unknown hosts. + This module handles that for you.
+When you save a Beacon Endpoint, the module automatically adds that host to the
+ connect-src and img-src CSP directives, so beacons are never blocked — even in
+ restrict (enforced) mode. You do not need to edit csp_whitelist.xml.
6 Verify it works
+-
+
Open your storefront
Visit any page of your store in a normal browser tab.
+ Open developer tools
Press F12 (or ⌘+⌥+I) and + select the Network tab.
+ Look for the beacon
+Filter by your collector host. Within a few seconds of the page settling you should see a request to + your Beacon Endpoint carrying
+p_typeandp_gen=mage2.
+ Check the console
+The Console tab should show no CSP violation errors mentioning your beacon + host. If it does, see Troubleshooting below.
+
7 Settings reference
+| Setting | Config path | Description |
|---|---|---|
| Enable | basicrum/general/enabled |
+ Master switch. When off, nothing is injected on the storefront. |
| Beacon Endpoint | basicrum/general/beacon_endpoint |
+ Full URL of your collector. Validated as a URL; its host is auto-whitelisted for CSP. |
| Beacon Token / Site Key | basicrum/general/token |
+ Optional. Stored encrypted; appended to the beacon URL as &token=… when set. |
| Boomerang JS Version | display only | +Shows the bundled Boomerang build. Informational; not editable. |
Settings honour Magento config scope (Default / Website / Store View).
+? Frequently asked questions
+ +Do I need an API key or token?SETUP
+Only if your collector requires one. Enter it in the dedicated Beacon Token /
+ Site Key field — it is stored encrypted and appended to the beacon URL automatically as
+ &token=…. A self-hosted BasicRUM catcher typically needs no token at all, so you can
+ leave it blank.
Does this collect personal data or set tracking cookies?PRIVACY
+The module sends performance beacons (timings, resource metrics). Boomerang
+ sets a first-party session cookie to correlate a session's beacons; it is configured here as
+ secure and SameSite=Strict. It does not capture form contents or personal
+ identifiers. Always confirm your own privacy/consent obligations for your jurisdiction and collector.
Will it slow down my store?PERFORMANCE
+Boomerang is loaded asynchronously after the page is interactive, and + the beacon is sent a short delay after the page finishes loading — so measuring does not compete + with rendering. The library is ~30 KB gzipped and served from your own static domain.
Does it work with Hyvä / a headless front end?COMPATIBILITY
+Yes for standard Luma and Hyvä storefronts — it injects via a layout block into
+ before.body.end and uses CSP-safe inline script rendering. A fully headless (PWA) front end
+ does not render Magento layout, so you would integrate Boomerang in that front end instead.
Can I use a different Beacon Endpoint per store view?SCOPE
+Yes. Change the scope selector at the top of the configuration page to a specific + Website or Store View before entering the value and saving.
How do I upgrade the bundled Boomerang library?MAINTENANCE
+Replace view/frontend/web/js/boomr/boomerang.min.js with your new build
+ and update the VERSION constant in Model/Boomerang.php. The template references a
+ version-agnostic path, so no template edit is needed. Clear caches and re-deploy static content.
What happened to the "Consent Settings" section?CHANGES
+It was removed in v0.1.0. Those fields were shown in the admin but never actually did + anything (no consent gating was applied), which was misleading. Real consent gating can be added as a + proper feature in a future release.
! Troubleshooting
+Work top to bottom — the most common causes are first.
+ +No beacon appears in the Network tabFIX
+Check, in order:
+-
+
- Enable is set to Yes and config is saved. +
- Beacon Endpoint is a full, correct URL. If it is empty, the module renders nothing. +
- You flushed the cache after saving (
bin/magento cache:flush).
+ - You waited a few seconds — the beacon is sent after the page fully loads. +
- No ad-blocker / privacy extension is blocking the request (test in a private window). +
Console shows a "Content Security Policy" / "Refused to connect" errorFIX
+The host being blocked must match your Beacon Endpoint host. Confirm the endpoint
+ host is exactly the host the browser connects to (including any CDN in front of it), then re-save and
+ flush caches so the CSP header is regenerated. If you set a custom CSP elsewhere, ensure it does not
+ strip connect-src/img-src additions.
"Please enter a valid URL" when saving the endpointFIX
+The field requires a full URL including scheme, e.g. https://rum.example.com/beacon
+ — not a bare host like rum.example.com. Add https:// and save again.
Composer error about PHP or Magento versionFIX
+This release targets PHP 8.3/8.4 and Magento 2.4.8+. + On older stacks Composer will refuse to install. Upgrade your platform, or pin to an older module release + that matches your environment.
The module is enabled but the admin section is missingFIX
+Run bin/magento setup:upgrade and flush caches. If your admin user cannot
+ see it, grant the Stores → Settings → Configuration → BasicRum Analytics ACL resource to the
+ admin role under System → User Roles.
Beacons work locally but not in productionFIX
+Production mode caches DI and static content. After changing config or updating the
+ module run bin/magento setup:di:compile, re-deploy static content, and flush caches. Also
+ confirm your production CSP mode (report-only vs restrict) and that the beacon host resolves publicly.
+
Still stuck? Check the module CHANGELOG.md and README.md, or open an
+ issue on the project repository with your Magento version, PHP version, and the exact Console/Network error.