PostHog / posthog-js-lite

Reimplementation of posthog-js to be as light and modular as possible.
https://posthog.com/docs/libraries
MIT License
69 stars 36 forks source link

chore: session id will be rotate on app restart #271

Closed marandaneto closed 2 months ago

marandaneto commented 2 months ago

Problem

Closes https://github.com/PostHog/posthog-js-lite/issues/268

Changes

Release info Sub-libraries affected

Bump level

Libraries affected

Changelog notes

  1. chore: session id will be rotate on app restart.
    1. To keep the session id across restarts, set the enablePersistSessionIdAcrossRestart option to true when initializing the PostHog client.
export const posthog = new PostHog(
  'apiKey...',
  {
    // ...
    enablePersistSessionIdAcrossRestart: true,
  },
);
github-actions[bot] commented 2 months ago

Size Change: +11 B (+0.01%)

Total Size: 73.6 kB

Filename Size Change
posthog-web/lib/index.cjs.js 16.9 kB +5 B (+0.03%)
posthog-web/lib/index.esm.js 16.8 kB +6 B (+0.04%)
ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `posthog-node/lib/index.cjs.js` | 20 kB | | `posthog-node/lib/index.esm.js` | 19.9 kB |

compressed-size-action