-
Notifications
You must be signed in to change notification settings - Fork 463
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
fix: Track transaction item open events #2602
Conversation
Branch preview✅ Deploy successful! https://fetch_details_event--walletweb.review-wallet-web.5afe.dev |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
@@ -126,7 +126,9 @@ const TxDetails = ({ | |||
|
|||
const [txDetailsData, error, loading] = useAsync<TransactionDetails>( | |||
async () => { | |||
trackEvent(TX_LIST_EVENTS.FETCH_DETAILS) | |||
if (!txDetails) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a negation, isn't it? Why do we even track this event? We should track clicks on the accordeon, not the fetch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also considered tracking this event on the accordion click but with the current structure it doesn't seem possible since the fetch is in a nested component and with the accordion click we can only know if it was opened or closed but not if we already fetched the data before. Do you think we should track the first accordion open in general regardless of the fetch status?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I think we should track the user intention, not how our app interpreted it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it so we track the accordion open once. I also renamed the event to better fit the new purpose.
What it solves
Fix for #2543
This will significantly reduce the number of events that are tracked due to users opening a single transaction view (which is already tracked by a page view event).
How this PR fixes it
Fetch transaction details
eventExpand transaction item
event whenever the user expands a transaction itemHow to test it