Dashboard Widgets

This project contains standalone widgets designed to be embedded in iframes. Each widget receives configuration via postMessage from the parent window.

Available Widgets

Google Analytics
Active users and page views metrics
/widgets/google-analytics
User Statistics
Subscriber counts and registration data
/widgets/user-statistics
Notification Statistics
Notification delivery metrics
/widgets/notification-statistics

Testing a Widget

Open a widget route and use the browser console to send configuration:

window.postMessage({
  instanceKey: "test",
  apiBaseUrl: "https://test.mpanel.app/api/dashboard",
  signedToken: "your-token",
  dateRange: {
    start: "2025-10-05",
    end: "2025-11-05"
  }
}, "*");