RumVision Tracking for Hyva
foundation-commerce/module-rumvision-tracking
Integrates the RumVision real user monitoring (RUM) tracking script into Hyva Theme frontend pages with CSP-compliant inline script injection. Configurable per store view via the admin panel.
Build Tests
Code Quality
Tested on Magento 2.4.8-p4
Recent Test History
Each release is tested against the latest Magento version at that time.
Top Contributors
View LeaderboardShare This Module's Status
README
Loaded from GitHubFoundationCommerce RumVision Tracking For Hyvรค Theme
Integrates the RumVision real user monitoring (RUM) tracking script into all frontend pages of your Hyvรค Theme. The script is configurable via the Magento admin panel and can be enabled/disabled per store view. The inline script is CSP compliant using Hyvรค's HyvaCsp helper.
Installation
composer require foundation-commerce/module-rumvision-tracking
After installation or updates, run:
php bin/magento module:enable FoundationCommerce_RumvisionTracking
php bin/magento setup:upgrade
php bin/magento cache:flush
Configuration
Navigate to: Stores > Configuration > Foundation Commerce > RumVision Tracking
General Settings
- Enable RumVision Tracking: Turn the tracking script on/off
- RumVision Site ID: Your RumVision site ID (found in your RumVision dashboard, e.g.
RUM-66DC162C53) - Domain Name: The domain name passed to the RumVision tracking script (e.g.
example.com)
The tracking script will only render on the frontend when the module is enabled and both a site ID and domain name are configured.
How It Works
When enabled, the module injects the RumVision JavaScript tracking snippet before the closing </body> tag on all frontend pages. The script loads asynchronously and does not block page rendering.
The inline script uses Hyvรค's HyvaCsp::registerInlineScript() for Content Security Policy compliance. When full page cache is enabled, a SHA-256 hash of the script is added to the CSP header. When FPC is disabled, a nonce attribute is injected on the script tag instead.
Module Structure
app/code/FoundationCommerce/RumvisionTracking/
โโโ Model/
โ โโโ Config.php # Configuration accessor
โโโ ViewModel/
โ โโโ TrackingScript.php # ViewModel for the tracking template
โโโ etc/
โ โโโ acl.xml # Admin ACL resource
โ โโโ adminhtml/
โ โ โโโ system.xml # Admin configuration fields
โ โโโ config.xml # Default configuration values
โ โโโ module.xml # Module declaration
โโโ view/
โ โโโ frontend/
โ โโโ layout/
โ โ โโโ default.xml # Layout injection on all pages
โ โโโ templates/
โ โโโ tracking-script.phtml # Tracking script template
โโโ composer.json
โโโ README.md
โโโ registration.php
Troubleshooting
- Script not appearing: Verify the module is enabled and both a site ID and domain name are set. Flush cache with
php bin/magento cache:flush. - CSP errors in browser console: Ensure the Hyvรค theme module is installed and up to date. The
HyvaCsphelper handles nonce/hash injection automatically. - Script on wrong pages: The script is injected on all frontend pages via
default.xml. To restrict it, modify the layout XML. - Check module status:
php bin/magento module:status FoundationCommerce_RumvisionTracking
This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.