Skip to main content
Embedding requires the embedding add-on for Cloud Pro or Enterprise. Get in touch to add embedding to your plan. For self-hosted deployments, follow embedding setup.
Try it and see the code. embed.lightdash.com is an interactive demo and helper that lets you preview embedded content and generate a JWT for your own project. For a working end-to-end example, see the example embed app on GitHub — a Node.js app that mints tokens server-side and renders a Lightdash dashboard.

What can you embed?

Lightdash supports embedding several types of content, each designed for different use cases:

Dashboards

Embed complete dashboards with multiple visualizations, filters, and tabs. Perfect for providing comprehensive analytics views in your application. Use cases:
  • Executive dashboards in admin panels
  • Customer-facing analytics portals
  • Embedded reporting for SaaS applications
Learn more about embedding dashboards →

Charts

Embed individual saved charts for focused, single-metric displays. Charts provide a minimal UI for clean integration. Use cases:
  • Single KPI widgets in applications
  • Embedded metrics in marketing pages
  • Focused analytics in workflows
Learn more about embedding charts →

AI agents

Embed a Lightdash AI agent so customers can chat with their data and generate charts without leaving your product. Each embed is scoped to a single agent and space. Use cases:
  • “Chat with your data” experiences inside customer-facing apps
  • Self-serve analytics where customers can ask ad-hoc questions
  • Scoped AI access where each customer can only see their own content
Learn more about embedding AI agents →

Metrics catalog

Embed the project’s metrics catalog so users can browse the metrics and dimensions in your semantic layer, preview them, and — if you allow it — jump into Explore from any metric. Great for surfacing “what can I measure?” inside your product without exposing a full Lightdash workspace. Use cases:
  • A self-serve metric browser inside a customer-facing app
  • A discovery surface next to your own charts so users can find related metrics
  • Guided exploration where users start from a metric and continue into Explore
Metrics catalog embedding requires the React SDK. iframe embedding is not supported for the metrics catalog. Learn more about embedding the metrics catalog →

Data apps

Embed a data app as standalone content in an iframe — the full app, no dashboard or surrounding chrome. Useful when you want to surface an entire AI-generated app as a feature in your product. Use cases:
  • Customer-facing interactive reports
  • Embedded narratives or slide-show apps in your product
  • Self-serve analytics views built on your semantic layer
Learn more about embedding data apps →

Choose an embedding method

Lightdash offers two ways to embed content in your own application. iframe embedding lets you embed content inside your own web page: dashboards, charts, standalone data apps, and AI agents. You generate a JWT, construct a URL, and add it to an <iframe> tag. There are no additional setup requirements and this works anywhere (React, Vue, plain HTML). An embed URL also opens on its own in a browser tab; see Open an embed URL as a link. React SDK (@lightdash/sdk) is the most powerful option. It supports dashboards, charts, AI agents, and the metrics catalog, lets you pass filters programmatically, hook into user interaction callbacks (like when someone navigates to Explore), and apply custom styling to match your app. It requires a React/Next.js app and your app’s origin in your organization’s CORS settings. Both methods use the same JWT-based authentication and security model.

Quick comparison

Passing filters to embedded dashboards

Both methods support filters, just differently:
  • JWT config — Set filters in the token payload at embed time. Works for both methods.
  • React SDK filters prop — Pass them dynamically at runtime. Better if filters need to change based on the logged-in user.

CORS

CORS controls which browser origins can call the Lightdash API. You only need to configure it when your embedded application calls Lightdash from the browser — that is, when using the React SDK. iframe embeds do not need CORS. See Set up CORS for how to add your origins.

Quick start: Embed a dashboard

This quick start will walk you through embedding your first dashboard using an iframe.

Step 1: Create an embed secret

First, you need to generate a secret per project. This secret is like a password that will help you encrypt the URLs so we know the access is valid.
Project settings on the Embed configuration tab, showing an empty "No embed secret" state with a Generate embed secret button
You can regenerate the secret by clicking on the Generate new secret button. If you do this, every embed URL signed with the old secret stops working.

Step 2: Add allowed dashboards

Only selected dashboards can be accessed via embed URLs. Add the dashboard you want to embed to the allowed list.
The Allowed dashboards card with its dashboard picker open, listing two selectable dashboards

Step 3: Configure and preview

Under the “Configure” section, you can:
  • Select which dashboard to embed
  • Set token expiration time
  • Configure interactivity (filters, exports, etc.)
  • Add user attributes for row-level security
The Preview panel with a dashboard selected, a one-hour expiry, an empty user attributes row, and Preview and Generate & copy URL buttons
Click on Preview to see how the embedded content will look, and click on Generate & copy URL to get a one-off embed URL for testing.

Step 4: Generate tokens programmatically

Although you can generate URLs directly from Lightdash with a long expiration, it is recommended to generate your own JWTs in your backend with a short expiration using your secret to make sure people can’t be using embed URLs outside your app. Lightdash provides code snippets you can copy and use in your app to generate valid embed URLs, and the embedding reference documents the full JWT structure:
The Code snippet panel showing NodeJS and Python tabs, with NodeJS code that signs a dashboard JWT and builds the embed URL

Common questions

Do I need a Lightdash account to view embedded content?

No, embedded Lightdash content is available to view by anyone (not just folks with a Lightdash login). So, for example, you could embed a dashboard in your product, and anyone who has access to your product would have access to that dashboard. No need to login to Lightdash. We make sure that the links are secure and have a set expiry time that you pick. Because embedded viewers aren’t Lightdash users, they have no personal warehouse credentials. Embeds can’t run queries in a project whose connection has Require users to provide their own credentials turned on; they fail with Embedded users cannot use personal warehouse credentials.

How does security work?

Embedded content is secured using JWT (JSON Web Tokens) that you sign with your embed secret. The token includes:
  • What content to display (dashboard or chart)
  • Expiration time
  • User attributes for row-level filtering
  • Permissions for interactivity (filters, exports, etc.)
Tokens are short-lived and should be generated server-side to prevent exposure of your embed secret.

Can I test embedding in a separate development project?

Yes. The embed secret and the allowed dashboards, charts and other content belong to one project, so nothing carries over from your production project. In the development project, generate its own embed secret and add the content you want to embed, then have your development backend sign tokens with that secret and use that project’s UUID in the embed URL. CORS origins are set for the whole organization, so you add your development origin once.

Can I show different data to different users?

Yes! You can use user attributes to implement row-level security in your embedded content. This allows you to filter data based on the viewing user’s properties (e.g., tenant ID, region, etc.).

Do embedded viewers get their own Lightdash user?

An embedded viewer doesn’t need a Lightdash user account. Their JWT controls their access. For saving changes and attributing them to individual viewers, see write actions and actor identity.