PostHog + Sveltekit

Github Repo

Cookie/User Identity

{
  "sessionToken": "723f3b80-7b0e-4081-bb56-8ccf6a312752",
  "userId": "7a90fe22-1a37-43d3-9bc0-d9011f1a558a",
  "posthogId": "7a90fe22-1a37-43d3-9bc0-d9011f1a558a"
}

Server Request to PostHog API /decide

{
  "experimentServer": "test",
  "flagIsEnabled": true,
  "experimentComponent": "control",
  "experimentMultivariate": "variant_2",
  "flagIsToggle": false
}

Subscribed Feature Flag Store

{
  "experimentServer": "test",
  "flagIsEnabled": true,
  "experimentComponent": "control",
  "experimentMultivariate": "variant_2",
  "flagIsToggle": false
}