Next.js — Super properties
Super properties are automatically included with every event you capture. Useregister() 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
Getregister, 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. ReturnsRecord<string, unknown>.
When to use: Debugging or checking which properties are registered.
