Skip to main content
Tags are optional key-value pairs that you can attach to events in Corbado Observe. Use tags to add business context, so you can segment and filter analytics without changing your flow or subflow model.

1. Why use tags

Use tags when you want to answer questions like:
  • How does login conversion differ by country?
  • Does auth success differ between experiment variants (auth_variant = A vs B)?
Tags are optional. If you do not send tags, tracking still works.

2. Send tags from the SDK

In the Corbado Observe SDK, most tracking methods accept tags as an optional second argument (Record<string, string>). You can attach tags:
  1. Globally via defaultTags in tracker initialization.
  2. Per event by passing a tags object to a tracking call.
Corbado Observe SDK installation and setup are explained in Getting started.

2.1 Define global default tags

import { init, getTracker } from "@corbado/observe";

init({
  projectId: "<ProjectID>",
  apiBaseUrl: "<APIBaseURL>",
  defaultTags: {
    country: "de"
  },
});

getTracker().flowStarted({
  flowName: "login",
  touchpoint: "account",
});

2.2 Pass tags per event

import { getTracker } from "@corbado/observe";

getTracker().flowStarted(
  {
    flowName: "login",
    touchpoint: "checkout",
  },
  {
    country: "de"
  },
);

3. Tagging best practices

  • Keep tags short, predictable, and business-relevant.
  • Use strings for all values (for example is_new_user: "true").
  • Avoid high-cardinality identifiers (for example raw user IDs) as tags.
  • Prefer user references for identity mapping and tags for segmentation.

4. Next steps

  • Continue with Flows to model complete journeys.
  • Continue with Decisions to track explicit user and system choices.