Insights Page Widgets
The "Insights" page can be extended with custom widgets which are used to display charts, metrics or other information that can be useful for administrators to see at a glance.
Example
Here's an example of a custom widget:
Always wrap your custom widget in the DashboardBaseWidget component, which ensures that it will render correctly
in the Insights page.
Use the useWidgetFilters() hook to get the currently-selected date range, if your widget depends on that.
Then register your widget in your dashboard entrypoint file:
Your widget should now be available on the Insights page:
Was this chapter helpful?
