Session attributes changed

Learn how to track changes to session attributes.

This event tracks changes to session attributes.

Croct's mascot amazed
Automatically tracked

The SDK automatically tracks this event when you update the session attributes.

Implementation

Here is an example of how to track this event:

example.js
12345678
import croct from '@croct/plug';
const patch = croct.session.edit();
const promise = patch    .set('selectedPlan', 'Premium')    .save(); 

Input properties

This event has no input properties.

Processed properties

These properties are automatically tracked:

patch
object

A set of operations performed on the session attributes.

Payload examples

Below are some payload examples for this event:

123456789101112
{  "type": "sessionAttributesChanged",  "patch": {    "operations": [      {        "type": "set",        "path": "selectedPlan",        "value": "Premium"      }    ]  }}