gene/module-newrelic-rum-page-type
Composer 安装命令:
composer require gene/module-newrelic-rum-page-type
包简介
Track pageType in New Relic Real User Monitoring
README 文档
README
Install this module to easily monitor and improve customer experience by tracking Core Web Vitals in New Relic by page type and enhancing your RUM setup.
🎉 If you are hosted on Adobe Commerce Cloud you already have New Relic with browser monitoring available! 🎉
Why install it?
By default New Relic is already tracking LCP, INP, and CLS on page views. This is recorded and queryable within New Relic. However you can only filter by some default values like domain or pageUrl. This granularity is insufficient for tracking changes and making targeted improvements on your ecommerce site.
To be able to make impactful changes we need to tbe able to answer questions like
- What are customers experiencing on the whole domain?
- What are customers experiencing on product pages?
- What are customers experiencing in the checkout?
By adding this module you will have this level of detail and be able to make more informed decisions and stay ahead of any regressions.
Installation
composer require gene/module-newrelic-rum-page-type
bin/magento setup:upgrade
How it works
This module adds a custom attribute to the New Relic PageViewTiming data to set the current request type as pageType.
This allows you to query the tracked data in segments like
cms_index_index- the homepagecatalog_product_view- product pagescatalog_category_view- listings pagescheckout_index_index- the checkout
How to use
1. Prepare a New Relic dashboard
It is best to view this data within a New Relic dashboard. We have prepared a dashboard template for you to get started with
- Copy the contents of
dev/new-relic-cwv-dashboard.jsoninto a text editor - Replace the dummy
1234567account ID with your actual New Relic account ID - Replace
www.example.comwith your actual domain. - Log into New Relic
- On the left panel click "Dashboards"
- On the top right click "Import Dashboard"
- Paste in the prepared JSON dashboard and import the "Core Web Vitals by PageType" dashboard.
- You will now see a dashboard highlighting your Core Web Vitals.
This LCP/INP/CLS charts have a horizontal target line, your web vitals for desktop and mobile should be below this target line.
2. Deploy this module to production
- Install this module on production. PageViewTiming metrics within New Relic will now have their
pageTypevalue attached. - Give it at least 24 hours for data to start filtering through, depending on your site and setup you may find patterns that some periods are slower when imports/exports are being triggered.
3. Make improvements for specific pageTypes
- When no filter is applied you can see the overall scores for your website, as well as other key pageTypes.
- By filtering through
catalog_product_view,catalog_category_view, etc you can identify areas for improvement and whether they are most significantly affecting desktop or mobile devices. - Use the Chrome Performance Panel
- Compare your experience to the experience of real users
- Configure your environment to better match that of the real users
- Investigate the additional panels, in particular the "rendering panel" can be very useful in improving CLS
- After you deploy a fix it may take some time for it to become fully visible in your dashboard graphs.
4. Set up automated alerting
- After you have improved your web vitals you want to monitor them to prevent regression.
- From the dashboard click
...on the top right of CLS/INP/LCP - Create an alert condition
- Follow instructions from https://docs.newrelic.com/docs/tutorial-create-alerts/create-an-alert/
Tips
- Alerting on a 24-hour rolling window seems to be the most stable.
- Have an alert for desktop, and one for mobile.
- Have alerts for specific page types, so that you are quickly alerted when something goes awry.
- Alerts can fire even when no deployments are made, changes in audience, third party tracking, or A/B testers may be the cause.
Caveats
New Relic RUM is not as complete as some other offerings, most notably it is missing LoAF. However, if you already have New Relic and are not currently looking at your RUM data then this module may be enough to get you kick-started on that journey and making targeted improvements.
gene/module-newrelic-rum-page-type 适用场景与选型建议
gene/module-newrelic-rum-page-type 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 945 次下载、GitHub Stars 达 15, 最近一次更新时间为 2025 年 07 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 gene/module-newrelic-rum-page-type 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 gene/module-newrelic-rum-page-type 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 945
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-only
- 更新时间: 2025-07-29
