openpanel icon indicating copy to clipboard operation
openpanel copied to clipboard

Feature Request: Allow tracking events that happened in the past.

Open TaylorFacen opened this issue 1 year ago • 1 comments

I run background jobs that might be delayed for various reasons. For example, although a user signs up at 10:30 AM, the background job to track the sign up and run downstream workflows might not run until 10:45 AM. If the user performs additional steps / page views after signing up, it could look like they viewed a page before signing up when they actually signed up before viewing a page.

Idea: An optional timestamp property when tracking events.

This is the only thing keeping me from OpenPanel so I would love to see it implemented.

TaylorFacen avatar Oct 05 '24 08:10 TaylorFacen

Will try to solve this!

lindesvard avatar Oct 08 '24 21:10 lindesvard

I have started to look at this (to keep you in the loop)

lindesvard avatar Oct 15 '24 21:10 lindesvard

I have started to look at this (to keep you in the loop)

Thanks! Let me know if you need me to test anything out.

TaylorFacen avatar Oct 16 '24 12:10 TaylorFacen

I'm done with this but refactored related code quite a bit so want to do some thorough testing before merging this.

Here is the PR: https://github.com/Openpanel-dev/openpanel/pull/76

lindesvard avatar Oct 17 '24 07:10 lindesvard

This is perfect. Thank you!

TaylorFacen avatar Oct 17 '24 11:10 TaylorFacen

anytime soon for this merge? :D

juandl avatar Oct 21 '24 13:10 juandl

Merged it today!

lindesvard avatar Oct 22 '24 19:10 lindesvard

I just realized that the nextjs sdk doesnt take a timestamp property. Any chance we can get that added in?

TaylorFacen avatar Oct 25 '24 20:10 TaylorFacen

Just pass "__timestamp: isodate" as a property. On mobile now, sorry for bad example

lindesvard avatar Oct 28 '24 20:10 lindesvard