Identify / Synchronize anonymous users client / server side

Created on 17 January 2025, 4 days ago

Problem/Motivation

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.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code (posthog)

Created by

🇩🇪Germany Grevil

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024