()
| 31 | } |
| 32 | |
| 33 | export function getUserEventsId() { |
| 34 | if (cookieValue) return cookieValue |
| 35 | cookieValue = Cookies.get(COOKIE_NAME) |
| 36 | if (cookieValue) return cookieValue |
| 37 | cookieValue = uuidv4() |
| 38 | Cookies.set(COOKIE_NAME, cookieValue, { |
| 39 | secure: document.location.protocol !== 'http:', |
| 40 | sameSite: 'strict', |
| 41 | expires: 365, |
| 42 | }) |
| 43 | return cookieValue |
| 44 | } |
| 45 | |
| 46 | export enum EventType { |
| 47 | page = 'page', |