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.| Parameter | Type | Required | Description |
|---|---|---|---|
properties | Record<string, unknown> | yes | Properties to include with all events |
registerOnce(properties)
Add properties only if they are not already registered. Useful for one-time attributes.| Parameter | Type | Required | Description |
|---|---|---|---|
properties | Record<string, unknown> | yes | Properties to register (only if not already set) |
unregister(propertyName)
Remove a super property so it’s no longer included with events.| Parameter | Type | Required | Description |
|---|---|---|---|
propertyName | string | yes | Name of the property to remove |
getSuperProperties()
Get all currently registered super properties. ReturnsRecord<string, unknown>.
When to use: Debugging or checking which properties are registered.
