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.
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: