These are the docs for the Metabase master branch. Some features documented here may not yet be available in the latest release. Check out the docs for the latest version, Metabase v0.52.
Embedded analytics SDK
⚠️ This feature is in beta. Feel free to play around with it, but be aware that things might change (and may not work as expected).
Embedded analytics SDK is only available on Pro and Enterprise plans (both self-hosted and on Metabase Cloud). You can, however, play around with the SDK on your local machine without a license by using API keys to authenticate your embeds.
With the Embedded analytics SDK, you can embed individual Metabase components with React (like standalone charts, dashboards, the query builder, and more). You can manage access and interactivity per component, and you have advanced customization for seamless styling.
The Embedded analytics SDK is currently in beta, but you should check it out and kick the tires; you can do a lot of cool stuff with it.
Example apps built with the embedded analytics SDK
To give you and idea of what’s possible with the SDK, we’ve put together example sites at metaba.se/sdk-demo. Navigate between three different shop websites: The Stitch, Luminara Beauty, and Pug & Play. Check them out and poke around their products and analytics sections, as well as the New Question and New Dashboard options.
Embedded analytics SDK prerequisites
- React application. The SDK is tested to work with React 18, though it may work with earlier versions.
- Metabase Pro or Enterprise subscription or free trial.
- Metabase version 1.51 or higher.
- Node.js 20.x LTS.
Embedded analytics SDK on NPM
Check out the Metabase Embedded analytics SDK on NPM: https://www.npmjs.com/package/@metabase/embedding-sdk-react.
Quickstart with CLI
If you have Node and Docker installed, you can change into your React application and run:
npx @metabase/embedding-sdk-react@latest start
Only works locally, and you don’t need a license key (but you can use one to demo more features).
See more about the CLI quickstart.
We also have a quickstart with a sample app that uses JWT.
Installation
You’ll need to enable the SDK in your Metabase, and install the SDK as a dependency in your app.
In Metabase
Enable the Embedded analytics SDK by going to Admin settings > Settings > Embedding. Toggle on the SDK, and hit Configure. Enter the origins for your website or app where you want to allow SDK embedding, separated by a space. Localhost is automatically included.
In your React application
You can install the Embedded analytics SDK for React via npm:
npm install @metabase/embedding-sdk-react@51-stable
or with yarn:
yarn add @metabase/embedding-sdk-react@51-stable
Developing with the embedded analytics SDK
- Quickstart with sample app and JWT
- Quickstart with CLI and your data
- Questions
- Dashboards
- Collections
- Appearance
- Plugins
- Versioning
- Authentication
- Config
- Notes on Next.js
Embedding SDK source code
You can find the embedding SDK source code in the Metabase repo.
Changelog
SDK limitations
The SDK doesn’t support:
- Verified content
- Official collections
- Subscriptions
- Alerts
- Server-side rendering (SSR).
- Multiple interactive dashboards on the same application page. If you need to embed multiple dashboards on the same application page, you can embed static dashboards.
Feedback
- Email the team at sdk-feedback@metabase.com.
- Message the team on Slack. If you don’t have a Slack channel set up, please reach out to us at sdk-feedback@metabase.com.
Read docs for other versions of Metabase.