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
Members & Loyalty (Peristeri)
Members, loyalty tiers and coupon usage
/widgets/peristeri-loyalty
App Screens (Peristeri)
Time spent per app screen from Google Analytics
/widgets/peristeri-app-screens

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"
  }
}, "*");