How to embed analytics in a React app: 13 SDKs compared on auth, tenant security, and AI chat (2026)
Max Musing
Max MusingFounder and CEO of Basedash
· March 17, 2026

Max Musing
Max MusingFounder and CEO of Basedash
· March 17, 2026

To embed analytics in a React app, pick a platform with a React package, mint a short-lived token on your server for each signed-in user, and scope that token to the customer’s data. As of November 2026, Metabase, ThoughtSpot, Tableau, Lightdash, Luzmo, Power BI, Sigma, and Basedash all publish React packages, but Basedash, Sigma, Power BI, and Lightdash wrap an iframe rather than rendering native components. Cube and Embeddable are the main options if you want to keep your own chart library.
This guide covers the four integration patterns, how 13 tools handle React, authentication, tenant isolation, and embedded AI chat, and what each costs.
Embedded analytics means putting dashboards, charts, and data exploration inside your own application instead of sending users to a separate BI tool. It shows up in two contexts:
Embedding keeps users in your product and lets your application’s authentication decide who sees what. That makes it the default when the audience is product users rather than analysts.
The cost is ownership. Your frontend team owns the integration, your backend owns token minting and the data pipeline, and your security model has to extend to every chart and filter.
There are four patterns, each trading control against implementation effort: iframe embedding, a vendor React SDK, a headless API with your own charts, and code-first component platforms.
The simplest approach. Your BI tool generates a URL for a dashboard or chart, often signed, and you render it inside an <iframe>.
function EmbeddedDashboard({ dashboardUrl }) {
return (
<iframe
src={dashboardUrl}
width="100%"
height="600"
frameBorder="0"
allowFullScreen
/>
);
}
Pros: fast to ship, works with any frontend framework, no vendor JavaScript in your bundle.
Cons: limited styling, fixed heights unless the vendor exposes resize events, and the experience can feel separate from your app.
Iframes are fine for internal tools. For customer-facing products, most teams want at least a theming layer.
Most platforms now publish a React package that handles token fetching, theming, and events. The package name below is a placeholder; the pattern is the same across vendors.
import { Dashboard } from '@analytics-platform/react';
function AnalyticsPage({ token }) {
return (
<Dashboard
token={token}
theme="light"
filters={{ team: "engineering" }}
onFilterChange={(filters) => console.log(filters)}
/>
);
}
Check what the SDK actually renders. Sigma’s React SDK is a set of hooks you attach to your own iframe, Power BI’s PowerBIEmbed renders an iframe, and Basedash’s components render Basedash through iframes. Tableau’s React package wraps its <tableau-viz> web component. The difference matters for styling, resize behavior, and how events reach your code.
Pros: typed props, token refresh handled for you, theming and event hooks.
Cons: vendor coupling, version pinning (Tableau and Metabase both ask you to match the package version to your server version), and React version requirements (Lightdash needs React 19.2 or later).
Instead of a vendor’s UI, you query an analytics API and draw charts with Recharts, Victory, Nivo, or D3. Cube’s @cubejs-client/react package exposes a useCubeQuery hook for this.
import { useEffect, useState } from 'react';
import { BarChart, Bar, XAxis, YAxis } from 'recharts';
function RevenueChart() {
const [data, setData] = useState([]);
useEffect(() => {
fetch('/api/analytics/revenue-by-month')
.then(res => res.json())
.then(setData);
}, []);
return (
<BarChart width={600} height={300} data={data}>
<XAxis dataKey="month" />
<YAxis />
<Bar dataKey="revenue" fill="#6366f1" />
</BarChart>
);
}
Pros: full visual control, your own design system, no iframe.
Cons: you build filtering, drill-down, exports, and any AI interface yourself.
A middle path: the platform runs the semantic layer, caching, and security, and you write or customize the chart components in React. Embeddable lets you define custom React components and push them to its platform, then renders dashboards through an <em-beddable> web component with no iframe. Luzmo ships React wrappers for its web components plus an embedded dashboard editor.
Pros: native-feeling UI with a managed query layer.
Cons: you adopt the platform’s modeling language (Embeddable uses Cube models) and a quote-based contract.
We compared each tool on six attributes that come up when teams choose a React embedding stack, and checked every claim against the vendor’s docs, npm registry entry, or pricing page on November 21, 2026:
| Tool | React package (latest, Nov 2026) | Rendering | Embed auth | Tenant isolation | AI in the embed | Embedding plan and price (Nov 2026) |
|---|---|---|---|---|---|---|
| Basedash | @basedash/embed 0.3.0 (React 18.2, 19) |
iframe | HS256 JWT, 10-minute default | Org per customer, groups claim, Postgres/Supabase RLS, signed filter tokens | BasedashChat component |
Enterprise only, contact sales |
| Metabase | @metabase/embedding-sdk-react 0.65.3 (React 18, 19) |
React components, bundle served by your instance | JWT or SAML SSO | Row and column security (Pro+) | MetabotQuestion, useMetabot |
Pro $575/mo with 10 users, +$12/user |
| Sigma | @sigmacomputing/react-embed-sdk 0.7.1 (hooks) |
Your iframe, managed by hooks | JWT-signed URL | User attributes and teams in RLS formulas | Embedded agent in a chat element | Premium feature, contact sales |
| ThoughtSpot | @thoughtspot/visual-embed-sdk/react 1.54.2 |
SDK components | Trusted auth tokens, cookieless recommended | RLS rules on tables, Orgs | SpotterEmbed |
Developer free (10 users, 25M rows); Enterprise quote |
| Power BI | powerbi-client-react 2.0.2 (React 18+) |
iframe | Embed token, service principal | EffectiveIdentity RLS roles |
Copilot narrative visual only (preview) | Capacity: A1 $1.0081/hour (East US) |
| Tableau | @tableau/embedding-api-react 3.14.0 |
Web components | Connected apps JWT | USERATTRIBUTE functions |
TableauPulse metrics |
Contact sales |
| Looker | @looker/embed-sdk 2.0.10 (JS API, no React components) |
iframe | Signed or cookieless embed | User attributes | Conversational Analytics embed | Embed edition, call sales |
| Omni | @omni-co/embed 1.3.0 (no React components) |
iframe | Signed URL | User attributes, topic access filters, dynamic schemas | White-labeled Omni Agent | No public pricing |
| Lightdash | @lightdash/sdk 3.359.1 (React 19.2+) |
iframe (agent native mode in beta) | JWT | User attributes in the token | Lightdash.AiAgent |
Cloud Pro from $3,000/mo + embedding add-on |
| Embeddable | No embed wrapper; @embeddable.com/react builds components |
Web component, no iframe | Server-minted token | Security filters, SQL-based security, access policies | <em-ai-chat>, bring your own LLM key |
Flat monthly fee, quote |
| Cube | @cubejs-client/react 1.8.31; @cube-dev/embed-sdk 0.0.13 (preview) |
Your charts, or iframe embeds | Signed embed sessions | Security context in the data model | Analytics Chat, Chat API | Premium $80/developer/mo + compute |
| Superset | @superset-ui/embedded-sdk 0.4.0 (JS, no React component) |
iframe | Guest token | RLS clauses in the guest token | Not documented for embeds | Free (open source); Preset add-on from $500/mo |
| Luzmo | @luzmo/react-embed 10.0.0 |
React wrapper for web components | Embed tokens | parameter_overrides, account overrides |
Luzmo IQ chat component | From €1,995 / $2,495 per month, annual |
Explo, which appeared in earlier versions of this comparison, was acquired by Omni in October 2025. Omni said it would migrate most Explo customers over 12 months “before sunsetting the Explo platform.” That window has passed without a published end date, and Explo’s pricing page no longer loads, so new projects should evaluate Omni instead.
Best for: SaaS teams that want to embed AI chat and self-serve dashboards for customers, on top of Postgres, MySQL, Snowflake, BigQuery, or another live connection.
@basedash/embed, open source, React 18.2 and 19. Components include BasedashChat, BasedashDashboards (with dashboard and chart creation), BasedashInsights, BasedashAutomations, BasedashModels, BasedashApp, and a provider-free BasedashSharedDashboard.createEmbedToken from @basedash/embed/server signs an HS256 JWT with a 10-minute default expiry. Allowed origins restrict which domains can load the embed.groups claim, and enforce row-level security on Postgres and Supabase through the basedash.groups session variable. Shared dashboards accept signed filter tokens that lock values like company_id server-side.hideSuggestedPrompts.Best for: teams that want React components for questions, dashboards, the query builder, and AI chat, with an open-source core.
@metabase/embedding-sdk-react, React 18 and 19 (Metabase 66 drops React 18). Since Metabase 57 the npm package is a bootstrapper and the full SDK loads from your Metabase instance. No server-side rendering.MetabotQuestion and useMetabot on Pro and Enterprise. Embedded chat builds query-builder questions; it won’t write SQL or edit dashboards.Best for: Snowflake and Databricks teams embedding spreadsheet-style workbooks with writeback.
@sigmacomputing/react-embed-sdk provides hooks such as useSigmaIframe and useWorkbookVariables. You render the iframe yourself.Best for: search-first and AI-first embedded analytics with React components for each surface.
@thoughtspot/visual-embed-sdk/react with LiveboardEmbed, SearchEmbed, AppEmbed, SpotterEmbed, and a useEmbedRef hook.SpotterEmbed embeds Spotter’s AI search and conversation.Best for: Microsoft-stack teams that already model data in Power BI.
powerbi-client-react exposes PowerBIEmbed, which renders an iframe.EffectiveIdentity with username and roles.Best for: organizations already on Tableau that want to embed vizzes and Pulse metrics.
@tableau/embedding-api-react with TableauViz, TableauAuthoringViz, and TableauPulse. Tableau recommends matching the library version to your Tableau Cloud or Server version.USERATTRIBUTE and USERATTRIBUTEINCLUDES filter rows from token attributes.TableauPulse component with a dedicated JWT scope.Best for: Google Cloud teams with LookML models who need governed embeds.
@looker/embed-sdk is a JavaScript API that builds iframes; it ships no React components./embed/conversations and /embed/agents on Looker-hosted instances.Best for: teams that want a semantic model, a white-labeled AI agent, and an app-like “create” mode in the embed.
@omni-co/embed 1.3.0 signs embed URLs on your server and now includes a browser mountOmniFrame helper. There are no React components; you render an iframe.entityAiCreditLimit to cap credits per customer.Best for: dbt teams that want open-source BI with a React SDK and embeddable AI agents.
@lightdash/sdk, React and React DOM 19.2 or later. Content loads in iframes by default.userAttributes for row filtering.Lightdash.AiAgent; a native render mode is in beta.Best for: product teams that want native-looking components they write in React, on a managed data layer.
<em-beddable> web component, which React treats like any custom element. @embeddable.com/react is for building your own components, not for embedding.<em-ai-chat> widget that uses your own LLM provider key.Best for: teams that want to keep their own chart library on top of a governed semantic layer.
@cubejs-client/react for headless useCubeQuery hooks, and the React Embed SDK (@cube-dev/embed-sdk), which is in public preview.Best for: self-hosting teams with a small budget and engineering time.
@superset-ui/embedded-sdk calls embedDashboard() to insert an iframe. There is no official React component.publisher = 'Nintendo' inside the token. The current stable release is 6.1.0.Best for: SaaS teams that want a dedicated embedded-analytics vendor with an in-app dashboard editor and AI chat.
@luzmo/react-embed 10.0.0.parameter_overrides in embed tokens for shared datasets, and account overrides for one database per tenant.In a multi-tenant app you must guarantee that Customer A never sees Customer B’s data, even on the same dashboard template. Three mechanisms work together: database or semantic-layer row filters, short-lived signed tokens, and a tenant isolation pattern.
Row-level security filters every query so users only see authorized rows. In PostgreSQL:
ALTER TABLE orders ENABLE ROW LEVEL SECURITY;
CREATE POLICY tenant_isolation ON orders
USING (tenant_id = current_setting('app.current_tenant')::uuid);
When the querying tool sets app.current_tenant (or, in Basedash’s case, basedash.groups) before each query, PostgreSQL filters results however the query is written. Most BI platforms instead apply filters in their own layer from token attributes: Tableau’s USERATTRIBUTE, Sigma’s user attributes, Lightdash’s userAttributes, Luzmo’s parameter_overrides, and Superset’s guest-token RLS clauses.
Every tool in the table authenticates embedded sessions with a token your server creates:
Keep tokens short-lived (Basedash defaults to 10 minutes; Superset guest tokens default to 5) and never put signing secrets in browser code.
tenant_id column. Simplest to run; works for hundreds of tenants.For a deeper treatment, see multi-tenant analytics architecture for embedded dashboards.
Natural language querying lets users type “What was our revenue by region last quarter?” and get a chart without writing SQL. In React you either drop in a vendor’s chat component or build your own pipeline.
As of November 2026, these components are documented for embedding: BasedashChat (Basedash), MetabotQuestion (Metabase), SpotterEmbed (ThoughtSpot), Lightdash.AiAgent (Lightdash), the Luzmo IQ chat component, Sigma’s embedded agent, Omni’s white-labeled agent, Looker Conversational Analytics, Cube Analytics Chat, and Embeddable’s <em-ai-chat>. They differ in scope. Metabase’s embedded chat only builds query-builder questions, Embeddable requires your own LLM key, and Sigma and Omni bill AI usage in credits.
If you build your own:
The custom route gives full control but means owning prompt design, validation, error recovery, and evaluation. Most teams start with a platform.
Embedded analytics adds load to your frontend and your data infrastructure. Plan for four things before launch:
React.lazy() and Suspense.A common production setup: production replicates to a read replica or warehouse, the analytics platform queries the replica with caching, and RLS or token filters apply at the platform or database.
Buying usually wins once you need more than a few dashboards, because filtering, drill-down, exports, security, and AI each take real engineering time to build and maintain.
| Factor | Build custom | Use an embedded analytics platform |
|---|---|---|
| Charting | Whatever you build | Full chart library included |
| Filtering and drill-down | Build from scratch | Built in |
| AI / natural language queries | LLM integration, validation, evaluation | Chat component on most platforms |
| Security (RLS, auth) | Build and maintain yourself | Token attributes and platform row filters |
| Maintenance | Every schema change, chart type, and bug | Vendor-managed |
| Customization | Unlimited | Limited to the SDK’s props, themes, and events |
| Cost | Engineering time | Subscription or capacity fees |
Custom builds still win for highly specialized visualizations, collaborative annotations, or interactions tightly bound to your product’s UI.
SpotterEmbed), Metabase (MetabotQuestion), Lightdash, or Luzmo IQ.As of November 2026: Basedash (@basedash/embed), Metabase (@metabase/embedding-sdk-react), Sigma (@sigmacomputing/react-embed-sdk), ThoughtSpot (@thoughtspot/visual-embed-sdk/react), Power BI (powerbi-client-react), Tableau (@tableau/embedding-api-react), Lightdash (@lightdash/sdk), Luzmo (@luzmo/react-embed), and Cube (@cubejs-client/react, plus a preview embed SDK). Looker, Omni, and Superset ship JavaScript packages that create iframes but no React components. Check the React version range before you commit: Lightdash needs React 19.2 or later, and Metabase is dropping React 18 in version 66.
ThoughtSpot Embedded has a free Developer tier for up to 10 users and 25 million rows, with React components for Liveboards, search, and Spotter. Metabase Pro costs $575 per month with 10 users and includes the React SDK and embedded AI chat; guest embeds work on every plan but are view-only. Cube Premium starts at $80 per developer per month if you want to draw your own charts. Superset is free if you can host it. Luzmo and Basedash Enterprise suit funded teams that want a vendor-managed experience with AI chat.
All 13 tools in this comparison filter rows from attributes in a server-signed token, so the question is where the rules live. Tableau, Sigma, and Lightdash read user attributes in calculations or models. Power BI maps an EffectiveIdentity to RLS roles. Superset puts RLS clauses in the guest token, and Luzmo uses parameter overrides. Basedash isolates each customer in its own organization and enforces Postgres or Supabase row-level security through group membership. Metabase row and column security requires Pro or Enterprise.
Basedash’s embedded chat shows suggested prompts that you can hide with hideSuggestedPrompts, and its dashboards component lets customers build their own charts and dashboards. ThoughtSpot’s SpotterEmbed embeds AI search and conversation. Metabase’s MetabotQuestion answers in query-builder questions, and the useMetabot hook lets you build a custom chat UI. Lightdash’s Lightdash.AiAgent and Luzmo’s IQ chat component are both React-embeddable. Power BI is the exception: for customer-facing embeds, Microsoft documents only a Copilot narrative visual, in preview.
Connect a platform with native Postgres support to a read replica, mint a short-lived token per user on your server, and render the vendor’s chat component. Basedash, Metabase, and Lightdash all work this way. Basedash also sets the user’s groups in a Postgres session variable, basedash.groups, so RLS policies written against it apply to AI-generated SQL too. Building your own pipeline means sending schema context to an LLM, validating the generated SQL, and running it with tenant filters, which is a larger project than most teams expect.
Yes. Cube’s @cubejs-client/react package returns query results through a useCubeQuery hook, so you can draw with Recharts, Nivo, or D3 while Cube handles the semantic layer, caching, and security context. Embeddable lets you write custom React components with any JavaScript library and push them to its platform. Most other tools render their own charts, so choosing them means theming their visuals rather than using yours.
Sigma, ThoughtSpot, Tableau, Looker, Omni, Metabase, Power BI, Lightdash, Cube, Luzmo, and Basedash all connect to Snowflake and support embedding. The React experience differs: ThoughtSpot, Tableau, Metabase, Lightdash, Luzmo, and Basedash ship React packages, Sigma provides React hooks around an iframe, and Omni and Looker use signed iframes. Basedash connects to Snowflake with a key pair or password through one connected role, so per-viewer Snowflake row access policies don’t apply; tenant scoping happens in Basedash.
The SDKs themselves are free npm packages; you pay for the plan that enables embedding. Published prices as of November 2026: ThoughtSpot Developer is free, Metabase Pro is $575 per month with 10 users, Cube Premium is $80 per developer per month plus compute, Lightdash Cloud Pro starts at $3,000 per month plus an embedding add-on, and Luzmo starts at €1,995 or $2,495 per month billed annually. Power BI Embedded A1 capacity is $1.0081 per hour in East US. Sigma, Omni, Tableau, Looker, Embeddable, and Basedash Enterprise are quote-based.
Use React.lazy() with Suspense to code-split your analytics components so they only load when the user opens an analytics page. Your initial bundle stays small, and SDK code won’t affect load times elsewhere:
const AnalyticsDashboard = React.lazy(() => import('./AnalyticsDashboard'));
function App() {
return (
<Suspense fallback={<div>Loading analytics...</div>}>
<AnalyticsDashboard />
</Suspense>
);
}
Written by

Founder and CEO of Basedash
Max Musing is the founder and CEO of Basedash, an AI-native business intelligence platform designed to help teams explore analytics and build dashboards without writing SQL. His work focuses on applying large language models to structured data systems, improving query reliability, and building governed analytics workflows for production environments.
Basedash lets you build charts, dashboards, and reports in seconds using all your data.