-
Notifications
You must be signed in to change notification settings - Fork 827
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
OI-2817: Add tracking for events on the write page #4231
Conversation
Size Change: 0 B Total Size: 5.94 MB ℹ️ View Unchanged
|
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.
Looks good! Just a small question :)
web/src/services/tracker.ts
Outdated
export function trackSingleSubmission( | ||
action: 'toggle-button-click' | 'submit', | ||
locale: string | ||
) { | ||
track('SingleSubmission', action, locale); | ||
} |
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.
Does track
return something? Because then you could just do it like this:
export function trackSingleSubmission( | |
action: 'toggle-button-click' | 'submit', | |
locale: string | |
) { | |
track('SingleSubmission', action, locale); | |
} | |
export trackSingleSubmission = ( | |
action: 'toggle-button-click' | 'submit', | |
locale: string | |
) => track('SingleSubmission', action, locale); |
This way the caller can decide if they want to throw away the result or not. The same goes ofc for the other function.
Adds tracking for specific events on the Write page