Skip to main content
Back to Strixa
Embedded Analytics SDK

Ship analytics inside your product
— not alongside it.

One JWT. Zero cookies. Full row-level security. The Strixa Embed SDK lets any engineering team drop governed, multi-tenant dashboards and reports directly into their own product in minutes.

JavaScript TypeScript React Angular Vue Python Ruby PHP .NET Go Swift Kotlin
Integration in 4 steps

From API key to live embed

The entire integration takes under an hour. No iframe CDN dependencies, no session bridging, no custom proxy servers.

01
Add your API key
Generate a server-side API key from Strixa Admin. Store it securely in your environment — it never touches the browser.
02
Mint an embed token
Your backend calls createEmbedToken() scoped to a dashboard ID, optional workspace, and optional RLS customer_id. Token is valid for 15 min.
03
Drop the component
Use <StrixaDashboard> (React/Angular/Vue) or <strixa-dashboard> web component. Pass your token endpoint — the SDK handles refresh automatically.
04
Configure allowlisted origins
In Admin → Branding → Embed, add your domain(s). Strixa rejects embed requests from any unlisted origin — no extra middleware needed.
SDK capabilities

One short-lived embed token is all that's needed. Your backend mints a signed JWT scoped to a dashboard, an optional workspace, and optional RLS customer parameters. The SDK verifies origin allowlists on every request — so you control exactly which domains can render embedded content.

Works with your stack
JavaScript TypeScript React Angular Vue Python Ruby PHP .NET Go Swift Kotlin
Token-based auth — no cookies
Your server mints a short-lived JWT (default 15 min TTL) scoped to a specific dashboard. No session sharing, no third-party cookies, no SSO complexity.
Row-level security (RLS)
Pass customer_id in the embed token. Strixa injects it as a row filter on every query — so each of your customers only sees their data, with no app-layer plumbing required.
Origin allowlisting
Set allowed domains in Admin → Branding → Embed. Strixa validates the X-Strixa-Embed-Parent-Origin header on every request, blocking unauthorized iframe hosts automatically.
Web component or React/Angular/Vue wrapper
Drop a single <strixa-dashboard> web component or the framework-specific component. The SDK handles token refresh, resize events, and theme passthrough automatically.
Theme & white-label passthrough
Pass theme.primaryColor directly to the SDK. Tenant branding, logo, and custom fonts propagate into every embedded surface automatically.
Multi-tenancy
Per-tenant branding, data isolation, and workspace scoping built into every embed token.
White-labeling
Primary colors, logo, and font propagate into embedded surfaces automatically.
PDF export
Embedded users can export dashboards and paginated reports to PDF from the embed UI.
Subscriptions
Schedule recurring PDF email delivery for embedded customers with their own RLS context.
embed-token.ts TypeScript · Server
// 1. Mint a short-lived embed token on your server
import { StrixaServer } from '@strixa/server-sdk';

const strixa = new StrixaServer({
  apiKey: process.env.STRIXA_API_KEY,
});

// Your API route — called by the browser before rendering
app.get('/api/embed-token', async (req, res) => {
  const token = await strixa.createEmbedToken({
    dashboardId: 'dash_revenue_2026',
    // Optional: scope data to this customer (RLS)
    customerId : req.user.orgId,
    ttlSeconds : 900,   // 15 min
  });
  res.json({ token });
});
Dashboard.tsx React · Client
// 2. Drop the component — SDK handles token refresh
import { StrixaDashboard } from '@strixa/react';

export function EmbeddedAnalytics() {
  return (
    <StrixaDashboard
      tokenEndpoint="/api/embed-token"
      theme={{ primaryColor: '#2563eb' }}
      locale="en-US"
    />
  );
}
Your App Your Server Strixa API Signed JWT SDK renders
dashboard.component.ts Angular · Client
import { StrixaEmbedModule } from '@strixa/angular';

// app.module.ts — import once
@NgModule({ imports: [StrixaEmbedModule] })

<!-- template -->
<strixa-dashboard
  [tokenEndpoint]="'/api/embed-token'"
  [theme]="{ primaryColor: brandColor }"
></strixa-dashboard>
index.html Vanilla JS / Web Component
<!-- Works in any framework or plain HTML -->
<script type="module"
  src="https://cdn.strixa.io/sdk/v1/embed.min.js"
></script>

<strixa-dashboard
  token-endpoint="/api/embed-token"
  theme-color="#2563eb"
  locale="en-US"
></strixa-dashboard>
embed_token.py Python · Server
from strixa import StrixaServer

strixa = StrixaServer(api_key=os.environ['STRIXA_API_KEY'])

# Flask / FastAPI route
@app.get('/api/embed-token')
def embed_token():
    token = strixa.create_embed_token(
        dashboard_id='dash_revenue_2026',
        customer_id=current_user.org_id,
        ttl_seconds=900,
    )
    return {'token': token}