定制 gene/module-newrelic-rum-page-type 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 homepage
  • catalog_product_view - product pages
  • catalog_category_view - listings pages
  • checkout_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

  1. Copy the contents of dev/new-relic-cwv-dashboard.json into a text editor
  2. Replace the dummy 1234567 account ID with your actual New Relic account ID
  3. Replace www.example.com with your actual domain.
  4. Log into New Relic
  5. On the left panel click "Dashboards"
  6. On the top right click "Import Dashboard"
  7. Paste in the prepared JSON dashboard and import the "Core Web Vitals by PageType" dashboard.
  8. 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.

New Relic Dashboard showing core web vitals with pageType filter

2. Deploy this module to production

  1. Install this module on production. PageViewTiming metrics within New Relic will now have their pageType value attached.
  2. 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

  1. When no filter is applied you can see the overall scores for your website, as well as other key pageTypes.
  2. 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.
  3. Use the Chrome Performance Panel
    1. Compare your experience to the experience of real users
    2. Configure your environment to better match that of the real users
    3. Investigate the additional panels, in particular the "rendering panel" can be very useful in improving CLS
  4. 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

  1. After you have improved your web vitals you want to monitor them to prevent regression.
  2. From the dashboard click ... on the top right of CLS/INP/LCP
  3. Create an alert condition
  4. Follow instructions from https://docs.newrelic.com/docs/tutorial-create-alerts/create-an-alert/

Tips

  1. Alerting on a 24-hour rolling window seems to be the most stable.
  2. Have an alert for desktop, and one for mobile.
  3. Have alerts for specific page types, so that you are quickly alerted when something goes awry.
  4. 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 gene/module-newrelic-rum-page-type 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 945
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 15
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 15
  • Watchers: 3
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: LGPL-3.0-only
  • 更新时间: 2025-07-29