Currently, if a user logs in, we identify them server-side if the setting is enabled in posthog_php. We do the same for posthog_js, but we also only if the user is not anonymous.
We need to think of a way on how we would identify anonymous users in sync with the front and backend.
Currently for logged-in users, the admin can decide on the settings page, what user data should be used for the distinct id for user identification (e.g. uid, mail, etc.). This is not possible with anonymous users.
It's not even that important to identify these users, since we could also use the anonymous id generated by posthog, but we want to have the same anonymous id for front and backend events. Maybe we could use that id for logged out users, but caching could be a problem.
Active
1.0
Code (posthog)