← All integration guides

Embed

Place a signed dashboard in your own product.

Mint a token

Starter and Premium projects can mint a short-lived embed token from the dashboard. The request origin must match the project allowlist when one is set.

Drop in the web component

Use the token with the analytica-dashboard element or an iframe pointed at /embed/[projectId]. Premium can hide Analytica branding.

<analytica-dashboard
  project-id="prj_your_app"
  token="signed-embed-token"
  origin="https://app.example.com"
></analytica-dashboard>

Row-level filters

Premium portals can lock an iframe to one client. Pass a filters object when you mint the token. The claims are signed with HMAC, so the iframe cannot widen userId, pathPrefix, or maxDays after the token is issued.

userId limits events to sessions identified as that person. pathPrefix limits events to paths that start with the prefix, such as /blog. Both are applied in SQL as extra AND conditions. A caller who asks for a broader user id still only receives the signed user.

POST /api/embed/token
{
  "projectId": "prj_your_app",
  "origin": "https://clients.agency.com",
  "filters": {
    "userId": "client_123",
    "pathPrefix": "/blog"
  }
}