-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
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
Add event tracking with PostHog #1482
Add event tracking with PostHog #1482
Conversation
Wow, this opens a lot of possibilities! Great feature to have. |
Library used for event tracking.
ebbc705
to
213e0b7
Compare
It does indeed! No performance changes, but I remembered I didn't check how well it behaves when the application is offline, and if the events are cached for the next session, like in Sentry. Will do some tests and if everything goes right I will merge it. EDIT: from my tests the events are lost if the application is closed before going online. I've opened an issue in their library repo to discuss that. In the meantime I will implement the persistence on our side. |
213e0b7
to
a2baba7
Compare
For now, the following are tracked: - App start - Session time - Video recording start/stop - Video recording time - Vehicle arming/disarming
…at persists between sessions This way, if the user uses the application while offline and close it, without ever being online in that session, we still preserve the events and send them when possible in a following online usage.
a2baba7
to
0b3ba49
Compare
@ArturoManzoli I've added a dedicated IndexedDB-based queue, that supports offline events. Could you check if they work for you? You basically want to test if, while offline, some event captures fail (in the network tab) and are cached in the dedicated IndexedDB (application tab), if they are still there when you reopen Cockpit and if their network calls are correctly sent when you reopen Cockpit again while online. |
This patch adds tracking of specific events to the PostHog platform.
It will help us better understand user behavior and how to improve the app.
For now, the following events are tracked:
More events should be tracked in the future.
User-data is anonymized by default.