Skip to Content

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

  1. Create a guest token in your backend. See Guest token API.
  2. Copy the dashboard ID. See Dashboard ID.
  3. Add the iframe, with embed=true at 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=true hides 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 expiryTime short.