Skip to content
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

Collapse OrderDurationRecorder and WaitingTimeTracker #15092

Open
iamgabrielma opened this issue Feb 7, 2025 · 1 comment
Open

Collapse OrderDurationRecorder and WaitingTimeTracker #15092

iamgabrielma opened this issue Feb 7, 2025 · 1 comment
Labels
category: tracks Related to analytics, including Tracks Events. type: enhancement A request for an enhancement.

Comments

@iamgabrielma
Copy link
Contributor

Related: #15082 (comment)

We have 2 different components that do similar work, these track the duration of an action from start to end, then this is used to send an event to Tracks. Would be worth checking if both are needed, and perhaps collapse functionality into a single component.

If that's not the case and we need to keep both, then there's some improvements that could be done to WaitingTimeTracker:

timeIntervalSince1970 feels like quite an implementation detail, as the timestamp can be based on different reference dates. As a further improvement, could this function just return a Date instead of a time interval? Then the time interval calculation could be internal to the time tracker

another future improvement would be to have an explicit start function in addition to end, so that the time tracker can be initialized first without starting time recording.

@iamgabrielma iamgabrielma added category: tracks Related to analytics, including Tracks Events. type: enhancement A request for an enhancement. labels Feb 7, 2025
@dangermattic
Copy link
Collaborator

🚫 Please add a type label (e.g. type: enhancement) and a feature label (e.g. feature: stats) to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: tracks Related to analytics, including Tracks Events. type: enhancement A request for an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants