Use event and session properties to add custom key-value pairs to user events and user sessions in order to capture business-specific context and tailor monitoring to your goals. For an example of how session properties support business analysis, see Extract a metric from user sessions. This page shows you how to configure these properties for your web frontend and send them using the JavaScript API.
Event and session properties must be configured before they can be used. Incoming event and session properties that are not configured are dropped during event ingest.
To configure an event or session property
Experience Vitals > Overview.cart.total_value).string, boolean, or number.Event and session properties use the namespaces event_properties and session_properties. Therefore, the configured field name is always prefixed with either event_properties. or session_properties., depending on the selected type, for example event_properties.cart.total_value.
As soon as you have configured an event or session property, you can start sending it via the JavaScript API.
When you report events via the JavaScript API using sendEvent or sendExceptionEvent, you can add event properties as parameters. To add event properties to any event—including those reported by the RUM JavaScript itself—use addEventModifier.
When adding an event property, always include the event_properties. prefix.
Session properties are always sent as standalone events. To send a session property, use sendSessionPropertyEvent. To include additional session properties in that event, use addEventModifier.
When sending or adding a session property, always include the session_properties. prefix.
The following limits apply to event and session properties:
event_properties. or session_properties. prefix.A–Z, a–z), numbers (0–9), underscores (_), and dots (.).