- Issue created by @Anybody
- 🇩🇪Germany Anybody Porta Westfalica
Let's see if 🐛 Only knock out if posthog_init is actually loaded Active fixes this, but I think it won't.
- 🇩🇪Germany Anybody Porta Westfalica
Here's the reason:
https://posthog.com/docs/data/sessions#how-does-posthog-define-a-sessionDrupal.posthog.reset();
You can also create a new session by calling posthog.reset() (which also starts a new session replay).
- First commit to issue fork.
- 🇩🇪Germany Anybody Porta Westfalica
Okay as just discussed, we need to do this all in Js but still ensure no cookie is set.
I'm on it and also adding this as follow-up: ✨ Add a posthog_cookies setting to decide which persistence value to set if consent is not given Active
- 🇩🇪Germany Anybody Porta Westfalica
Okay all solved. Now we're doing this all in JS!
@Grevil: Please post-review the code and especially the tests that should ensure that all is working as expected now, even cookies to be erased!
One further impediment we hat together was that
window.posthog.config
simply isn't reliable. Doesn't seem to be a public api and if you don't interact with the config before, it doesn't seem to be reliably there! But I don't think that will do any harm.I'll already merge this as hotfix, but please review critically and reopen if tests are not good enough to ensure it works as expected!
Automatically closed - issue fixed for 2 weeks with no activity.