User Guide
Other documentationsDemoCommunity
  • Forest Admin
  • Getting Started
    • Setup guide
    • Master your UI
      • The Table View
      • Using the Layout Editor mode
        • Customize the Table View
        • Customize the Details View
        • Customize your creation and edition forms
      • Build a Summary View
      • Build an Explorer View
      • Using Smart Views
    • Tutorials
  • Collections
    • Manage your collection settings
    • Customize your fields
      • Edit widgets
      • Display widgets
      • Options
      • Default actions on relationships
    • Actions
      • Edit a record
      • Create a record
      • Using Smart Actions
    • Segments
    • Scopes
    • Performance
  • Workspaces
    • Introduction to Workspaces
    • Using Workspaces
      • Sharing your own Workspace URL with pre-selected data
      • Editing records with field components
    • Building a workspace
      • Workspace Incident Management example
      • Workspace KYC example
      • Transactions Monitoring & Fraud Management example
      • Fleet Management example
  • dashboards
    • Charts
      • Create a chart
      • Display record-specific charts in Analytics
  • Other tabs
    • Collaboration
      • Communicate with Notes
      • Approval requests
      • Inboxes
    • Activity
  • Integrations
    • Metabase
  • Project settings
    • General tab
    • Environments tab
    • Teams, Users & Permissions
      • Create and manage a team
      • Add and manage users
      • Manage roles and permission levels
      • Export users history
    • Security tab
      • SCIM integration with OneLogin
      • SCIM integration with Okta
      • Manual SCIM integration with Okta
    • Other project settings
      • Interface tab
      • Billing tab
    • Organizations
      • Organization settings
        • Configure SSO with AWS IAM
        • Configure SSO with Azure AD
        • Configure SSO with Google
        • Configure SSO with Okta
        • Configure SSO with OneLogin
Powered by GitBook
On this page

Was this helpful?

  1. Integrations

Metabase

The synergy between Forest Admin and Metabase is perfect. While Forest Admin provides an easy way to manage data, Metabase enables you to analyze and extract insights from that data.

PreviousActivityNextGeneral tab

Last updated 1 year ago

Was this helpful?

All you have to do to embed your Metabase dashboard into Forest Admin is to create a new chart on Forest Admin and select the Chart type: "Smart Chart"

Then, click on "Edit in builder" to start creating your Smart Chart.

Component

No custom javascript is required to integrate Metabase, so you can leave the Component code by default:

import Component from '@glimmer/component';
import { loadExternalStyle, loadExternalJavascript } from 'client/utils/smart-view-utils';

export default class extends Component {}

Style

To create a visually attractive look, you can alter the CSS to fit your preferences, but this style should provide a quite good design experience.

.c-smart-chart {
  height: 100%;
  width: 100%;
}

.c-smart-chart__content {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  color: var(--color-beta-on-surface_medium);
}

.c-smart-chart__metabase {
  flex-grow: 1;
  border: none;
  margin: 0;
  padding: 0;
}

Template

The integration is done using an <iframe> to be included in your template. The src tag must be modified to specify the correct METABASE_SITE_URL and JWT_TOKEN.

<div class="c-smart-chart">
  <div class="c-smart-chart__content">
    <iframe src="https://METABASE_SITE_URL/embed/dashboard/JWT_TOKEN#theme=transparent&bordered=false&titled=true" frameborder="0" allowtransparency class="c-smart-chart__metabase">
    </iframe>
  </div>
</div>

METABASE_SITE_URL

This corresponds to the hostname of your Metabase instance. For example, if your Metabase instance is accessible through https://myanalytics.mycompany.com, then you must set your METABASE_SITE_URL to myanalytics.mycompany.com.

JWT_TOKEN

You must replace METABASE_DASHBOARD_ID by the the correct dashboard ID provided by Metabase.

JWT Payload:

{
  "resource": { "dashboard": METABASE_DASHBOARD_ID },
  "params": {}
}

And voilà! Your Metabase dashboard is now fully integrated into Forest Admin 💚.\

The JWT_TOKEN ensures valid authentication when retrieving the Metabase dashboard. The simplest way to do this is to generate it online using . To sign the JWT token, you need to use the METABASE_SECRET_KEY provided by Metabase.

https://token.dev