Skip to main content

Next.js — Super properties

Super properties are automatically included with every event you capture. Use register() to add properties, registerOnce() to add them only if not already set, and unregister() to remove them. Note: Super properties are client-side only; they don’t apply to server-side events.

Client: useSignal

Get register, registerOnce, unregister, and getSuperProperties from useSignal():

register(properties)

Add properties that will be included with every event. Overwrites existing properties with the same keys. When to use: Properties that apply to all events (e.g. app version, environment, user role, A/B test variants).

registerOnce(properties)

Add properties only if they are not already registered. Useful for one-time attributes. When to use: Properties that should be set once and never overwritten (e.g. initial app version, first session date).

unregister(propertyName)

Remove a super property so it’s no longer included with events. When to use: When a property no longer applies (e.g. user leaves an A/B test, app version is deprecated).

getSuperProperties()

Get all currently registered super properties. Returns Record<string, unknown>. When to use: Debugging or checking which properties are registered.

Example: A/B testing

See also

  • Capture — Track events (super properties are included automatically)
  • Identify — Set user identity