Migration & Legacy
Embed with an iframe (legacy)
Show a dashboard in an iframe through the Databrain demo page. Use the web component for new work.
This is a legacy way. It puts the guest token in a URL. Use <dbn-dashboard> instead: see the Embedding tutorial.
Steps
- Create a guest token in your backend. See Guest token API.
- Copy the dashboard ID. See Dashboard ID.
- Add the iframe, with
embed=trueat the end of the URL:
<iframe
src="https://demo.usedatabrain.com/?token=YOUR_GUEST_TOKEN&dashboardId=YOUR_DASHBOARD_ID&embed=true"
width="100%"
height="800"
style="border: 0"
></iframe>The dashboard shows inside the iframe.
Limits
embed=truehides the dashboard name, metric creation, scheduled email reports, layout changes and Manage metrics.- You cannot set component props, events or functions. Use the web component for those.
- The token is in the URL, so it can end up in browser history and logs. Keep
expiryTimeshort.