We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We have two deprecated plugins that use expensive caching to try and determine if the event is the first one: https://github.com/posthog/first-event-today https://github.com/posthog/first-time-event-tracker
I realised, for the user-side of things we could offload the expensive caching to the clients which now becomes relatively cheap.
Todo this we would need to store something like a map of events and timestamps:
eventTimeMaps: { "$pageview": Date.now(), "custom-event": Date.now() }
Then everytime we capture event the logic is pseudo:
if (!eventTimeMaps[event.event]) { properties["$is_first_event"] = true eventTimeMaps[event.event] = Date.now() } else if (eventTimeMaps[event.event].date < Date.now().date) { properties["$is_first_event_today"] = true eventTimeMaps[event.event] = Date.now() }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We have two deprecated plugins that use expensive caching to try and determine if the event is the first one:
https://github.com/posthog/first-event-today
https://github.com/posthog/first-time-event-tracker
I realised, for the user-side of things we could offload the expensive caching to the clients which now becomes relatively cheap.
Todo this we would need to store something like a map of events and timestamps:
Then everytime we capture event the logic is pseudo:
The text was updated successfully, but these errors were encountered: