Closed (fixed)
Project:
Posthog Analytics integration
Version:
2.x-dev
Component:
Code (posthog)
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2026 at 07:54 UTC
Updated:
6 May 2026 at 10:05 UTC
Jump to comment: Most recent
Comments
Comment #2
grevil commentedDiscussed this with @anybody internally and we both think the setting and the login hook is not needed (anymore).
Identifying the user server side doesn't give us any advantage anymore, since we sync the user distinct id between php and js. When the user is identified js side, a posthog user profile is created. If the user later on uses one of the posthog php commerce events, the very same user distinct id already used in js is passed to the php capture call.
We should make posthog_php require posthog_js, add a notice on the posthog_php settingsform, that the php extension requires cookies to identify the user properly and remove the login hook.
Comment #3
anybodyConfirmed! Happy to review later.
Comment #4
grevil commentedComment #6
anybodyRTBC! Just two final comments, then let's merge this!
Comment #8
grevil commentedComment #10
grevil commentedOh, just saw, that the tests throws an error "Unfinished AJAX requests while tearing down a test". I'll fix that in another issue!