diff --git a/frontend/src/component/feedbackNew/FeedbackComponent.tsx b/frontend/src/component/feedbackNew/FeedbackComponent.tsx index 6916e69c997b..41aeaa052213 100644 --- a/frontend/src/component/feedbackNew/FeedbackComponent.tsx +++ b/frontend/src/component/feedbackNew/FeedbackComponent.tsx @@ -225,7 +225,7 @@ export const FeedbackComponent = ({ setHasSubmittedFeedback(true); trackEvent('feedback', { props: { - eventType: `dont ask again`, + eventType: `dont ask again - ${feedbackData.category}`, category: feedbackData.category, }, }); @@ -242,6 +242,12 @@ export const FeedbackComponent = ({ if (isProvideFeedbackSchema(data)) { try { await addFeedback(data as ProvideFeedbackSchema); + trackEvent('feedback', { + props: { + eventType: `submitted - ${feedbackData.category}`, + category: feedbackData.category, + }, + }); toastTitle = 'Feedback sent'; toastType = 'success'; setHasSubmittedFeedback(true); @@ -258,6 +264,12 @@ export const FeedbackComponent = ({ const [selectedScore, setSelectedScore] = useState(null); const onScoreChange = (event: React.ChangeEvent) => { + trackEvent('feedback', { + props: { + eventType: `score change - ${feedbackData.category}`, + category: feedbackData.category, + }, + }); setSelectedScore(event.target.value); }; diff --git a/frontend/src/component/feedbackNew/FeedbackProvider.tsx b/frontend/src/component/feedbackNew/FeedbackProvider.tsx index b37a028924f4..965758bd4a01 100644 --- a/frontend/src/component/feedbackNew/FeedbackProvider.tsx +++ b/frontend/src/component/feedbackNew/FeedbackProvider.tsx @@ -20,13 +20,19 @@ export const FeedbackProvider: FC = ({ children }) => { trackEvent('feedback', { props: { - eventType: `feedback opened`, + eventType: `feedback opened - ${data.category}`, category: data.category, }, }); }; const closeFeedback = () => { + trackEvent('feedback', { + props: { + eventType: `feedback closed - ${feedbackData?.category}`, + category: feedbackData?.category || 'unknown', + }, + }); setFeedbackData(undefined); setShowFeedback(false); };