Sign up

Installation guides

Install on Bubble

Bubble has an app-wide field for header scripts. Visits are tracked on your live app, which needs a paid Bubble plan.

  1. Open Settings → SEO / metatags

    In the Bubble editor, open Settings in the left sidebar, then the SEO / metatags tab.

  2. Paste the snippet into the header scripts field

    Replace YOUR_SITE_ID with the public site ID from your site's Settings → Install card. The site ID is public and safe in browser code; never put your secret key in a page.

    Script/meta tags in header
    <script
      defer
      src="https://metricraven.com/js/script.js"
      data-site-id="YOUR_SITE_ID"
    ></script>

    Use the app-wide header field, not a page's own header or an HTML element on the page.

  3. Deploy to Live and open your app

    Deploy your development version to live, then open the live app on your domain in a private window.

Verify it works

Open your live website in a normal browser window (not an automated or embedded one). In the browser's Network panel, look for script.js and then a request to /api/v1/collect whose response contains ok: true. Open your site's Traffic tab and choose Refresh; the selected dates must include your visit.

Nothing showing? See Troubleshooting.

Notes

  • Bubble's Free plan has only a development version, without a live app or custom domain. Starter and higher plans can publish one.
  • Only hostnames listed in your site's Settings → General → Site domains (and their subdomains) are accepted. To also count visits on a platform address such as your-app.bubbleapps.io, add it there; otherwise those requests are refused with domain_not_allowed.
  • The development version (/version-test URLs) loads the same header code. Exclude your own browser while you build; see Exclude your visits.
  • Track workflows such as signups by running JavaScript (with a plugin like Toolbox) that calls window.analytics.track("signup"); see Goals & funnels.
  • Use the site-wide head code setting, not an embed or HTML widget: widgets that place code inside an iframe are ignored by the tracker.
  • If you use a cookie banner, connect it with Consent & visitor IDs.

Optional script attributes are listed in Install & verify. To exclude your own visits, see Exclude your visits.