posthog-js
posthog-js copied to clipboard
before_send in Node.js not called by $identify
Bug description
In posthog-js before_send is called for all events including $identify and $groupidentify. Meanwhile, in posthog-node, it is only called for capture* functions.
How to reproduce
- Add
before_send(event) { console.log(event); return event }handler on the server - Call
postHog.identify(...) - Nothing is logged to the console
Related sub-libraries
- [ ] All of them
- [ ] posthog-js (web)
- [ ] posthog-js-lite (web lite)
- [x] posthog-node
- [ ] posthog-react-native
- [ ] @posthog/react
- [ ] @posthog/ai
- [ ] @posthog/nextjs-config