Skip to main content

Web Vitals API

The Web Vitals API allows you to access performance metrics for your app directly through App Bridge. Use this API to monitor Core Web Vitals and send metrics to your own monitoring service.

  • Performance monitoring: Register a callback to receive Web Vitals performance data for your app.
  • Quality metrics: Monitor app performance metrics to identify and fix performance issues.
  • Analytics integration: Report Web Vitals data to your analytics service for tracking over time.
  • Diagnostics: Use alongside the debug configuration option to surface performance data during development.

The Web Vitals API provides an onReport method that registers a callback function to receive Web Vitals data. It allows you to monitor and analyze your app's performance in the Shopify admin.

Anchor to onReport
onReport
(callback: ) => Promise<void>

Registers a callback to receive Web Vitals performance data. Pass null to unregister a previously registered callback.



Was this page helpful?