lytics / ios-sdk

MIT License
0 stars 0 forks source link

add session key to event payloads #15

Closed markhayden closed 2 years ago

markhayden commented 2 years ago

The _sesstart key should be added to emitted events with the value of 1 when a new session starts. The session should be started the first time that any event is collected and only expire once a certain number of seconds has elapsed. The session length should be configurable at the app level and default to 30 minutes if no value is configured. For any events triggered between the session start and session expiration, no _sesstart key or value is necessary.

[
    {
        "eventName": "cart_add",
        "_ts": 1666115807452,
        "_sesstart": 1,
        "properties":{
            "cartItems": 10,
            "cartTotal": 59.99,
            "cartId": "d45c186e-347a-11ed-a261-0242ac120002"
        }
    }
]