Sign up

Installation guides

Install with Google Tag Manager

Create one Custom HTML tag that fires on every page, then publish the container.

  1. Create a Custom HTML tag

    In your container, choose Tags → New and pick Custom HTML as the tag type.

  2. Paste the snippet

    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.

    Custom HTML
    <script
      defer
      src="https://metricraven.com/js/script.js"
      data-site-id="YOUR_SITE_ID"
    ></script>
  3. Fire it on all pages

    Use a page-load trigger for all pages, such as All Pages. Save the tag.

  4. Preview, then publish

    Use GTM's Preview mode to confirm the tag fires once per page load, then Submit the container.

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

  • Don't add a history-change trigger for this tag. The tracker records single-page-app navigation itself; firing the tag again would load it twice.
  • The script reads data-site-id from its own element. If no collection request appears, inspect the injected <script> in the Elements panel and confirm the attribute is present.
  • When a blocker stops Tag Manager itself, tags inside it don't load either. Installing the script directly in your site avoids that dependency.
  • 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.