docs-mintlify/embedding/iframe/dashboards.mdx
Embed any dashboard into your application using an iframe. Dashboards can be embedded with either authentication mode:
To embed a dashboard for internal users:
Then paste the iframe code into your application:
<iframe
title="Dashboard"
src="https://your-account.cubecloud.dev/embed/dashboard/YOUR_DASHBOARD_PUBLIC_ID"
width="100%"
height="800"
></iframe>
Users will be prompted to sign in with their Cube credentials when accessing the embedded dashboard. See Private embedding for details on the auth model and integration examples (Notion, Salesforce).
To embed a dashboard for external/customer-facing applications, generate a session on your backend and pass the session ID into the iframe:
<iframe
title="Dashboard"
src="https://your-tenant.cubecloud.dev/embed/dashboard/YOUR_DASHBOARD_PUBLIC_ID?session=YOUR_SESSION_ID"
width="100%"
height="800"
></iframe>
See Signed embedding for the full session generation flow, API key setup, and a complete working example.
You can pre-set dashboard filter values by adding URL parameters in the format
?f_<semantic_view>.<dimension>=<JSON>. The <semantic_view> and <dimension>
must match the internal names (not display titles) of the semantic view and
dimension configured on the filter widget. If the filter type is omitted, it
defaults to equals.
Example:
https://your-tenant.cubecloud.dev/embed/dashboard/YOUR_DASHBOARD_PUBLIC_ID?session=YOUR_SESSION_ID&f_orders_transactions.users_country={"value":"USA"}
This works on both regular and published (embedded) dashboards. The filter is only applied if a matching filter widget for that dimension already exists on the dashboard.
You can style an embedded dashboard — background, padding, widget borders, titles, and fonts — from the Styling panel in the Dashboard Builder. See Dashboards → Styling for the full list of options.