Sign up

Features

Share & embed

On this page

Share a read-only dashboard with a link, or embed it in your own pages.

Create a share link

  1. Open Settings → Share & embed

    Create a read-only link.

  2. Send or embed the link

    Anyone with the link can view the shared reports.

Shared dashboards hide people's names, emails, visitor lists, live visitors, journeys and settings. Replace the link to invalidate the previous one, or turn sharing off.

Embed in an iframe

index.html
<iframe src="https://metricraven.com/share/YOUR_SHARE_TOKEN?embed=1&theme=light"
  title="Analytics" style="width:100%;height:1600px;border:0" loading="lazy"></iframe>

embed=1 hides the site header. Choose theme=light or theme=dark.

Follow your app's theme

  1. Add your app's origin to the iframe URL

    Add parent=https://YOUR_APP_DOMAIN: the exact origin of the page containing the iframe, including its port if needed.

  2. Send the current mode

    Send it on iframe load and whenever your app changes theme:

    script.js
    const frame = document.querySelector("iframe");
    const metricravenOrigin = new URL(frame.src).origin;
    function syncDashboardTheme(theme) {
      if (theme !== "light" && theme !== "dark") return;
      frame.contentWindow.postMessage({
        channel: "metricraven:private-embed:v1", type: "theme", theme
      }, metricravenOrigin);
    }
    // Call with your app's current mode after load and on theme changes.
    // Also resend when this exact frame reports that it is ready:
    window.addEventListener("message", (event) => {
      if (event.origin !== metricravenOrigin || event.source !== frame.contentWindow) return;
      if (event.data?.channel !== "metricraven:private-embed:v1" || event.data.type !== "ready") return;
      syncDashboardTheme(document.documentElement.dataset.theme === "dark" ? "dark" : "light");
    });

Give a teammate full access

A trusted teammate can sign in and choose Add an existing site with the site's secret key. This grants full site access, including private reports and settings. Use a share link when they only need read-only access.

Details

  • The embedded dashboard follows theme messages until its own light/dark button is used. That choice lasts until the iframe reloads and doesn't change your app's theme or the native MetricRaven preference.