Skip to content

Identify users

Opt a site into profiles and associate later events on the page with a user ID.

Identify a signed-in visitor on each page load. Identified tracking is the default, and new projects start with profiles on.

  1. Confirm the instance is not set to SUPERMETRY_TRACKING_MODE=anonymous. When the variable is unset, the instance runs in identified mode.

  2. Open Settings → General and check that Enable profiles is on. New projects start with it on; projects created earlier keep their previous choice, and you can turn it off at any time. Only keep it on when your users have consented to identifiable analytics.

  3. After the tracking script loads, pass your stable internal user ID and optional string traits.

    window.supermetry.identify("customer-123", {
    plan: "pro",
    account_type: "business",
    });
  4. Call identify on every page load. The tracker keeps the ID only in memory. To clear it on the current page, call:

    window.supermetry.identify(null);

What you should see: customer-123 appears under Profiles, and later events from that page are associated with it.