From 5deef7085df75d6fecc38012bdde191928800a8e Mon Sep 17 00:00:00 2001
From: Dillon Wheeler <dwheeler@gitlab.com>
Date: Tue, 25 Feb 2025 17:54:04 +0000
Subject: [PATCH] Update the event action field for duo feedback

This commit updates the `EVENT_ACTION` field that goes into the
`duoUserFeedbackMutation` GraphQL mutation.

The app.vue file is the one that actually changes the input to the
mutation. However I did include a change for the user_feedback.vue file
as well even though that is not being used at the moment.

EE: true
---
 ee/app/assets/javascripts/ai/components/user_feedback.vue  | 2 +-
 ee/app/assets/javascripts/ai/tanuki_bot/components/app.vue | 2 +-
 ee/spec/frontend/ai/tanuki_bot/components/app_spec.js      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ee/app/assets/javascripts/ai/components/user_feedback.vue b/ee/app/assets/javascripts/ai/components/user_feedback.vue
index 156f588e75390..d9b0d28616d2b 100644
--- a/ee/app/assets/javascripts/ai/components/user_feedback.vue
+++ b/ee/app/assets/javascripts/ai/components/user_feedback.vue
@@ -40,7 +40,7 @@ export default {
   methods: {
     trackFeedback({ feedbackOptions, extendedFeedback } = {}) {
       this.track(this.eventName, {
-        action: 'click_button',
+        action: 'duo_chat',
         label: 'response_feedback',
         property: feedbackOptions,
         extra: {
diff --git a/ee/app/assets/javascripts/ai/tanuki_bot/components/app.vue b/ee/app/assets/javascripts/ai/tanuki_bot/components/app.vue
index 0b4e1c89076b5..be22c60928c50 100644
--- a/ee/app/assets/javascripts/ai/tanuki_bot/components/app.vue
+++ b/ee/app/assets/javascripts/ai/tanuki_bot/components/app.vue
@@ -283,7 +283,7 @@ export default {
                 aiMessageId: id,
                 trackingEvent: {
                   category: TANUKI_BOT_TRACKING_EVENT_NAME,
-                  action: 'click_button',
+                  action: 'duo_chat',
                   label: 'response_feedback',
                   property: feedbackChoices.join(','),
                   extra: {
diff --git a/ee/spec/frontend/ai/tanuki_bot/components/app_spec.js b/ee/spec/frontend/ai/tanuki_bot/components/app_spec.js
index 2428a45861e09..7d8a1ee847923 100644
--- a/ee/spec/frontend/ai/tanuki_bot/components/app_spec.js
+++ b/ee/spec/frontend/ai/tanuki_bot/components/app_spec.js
@@ -462,7 +462,7 @@ describeSkipVue3(skipReason, () => {
             aiMessageId: feedbackData.message.id,
             trackingEvent: {
               category: TANUKI_BOT_TRACKING_EVENT_NAME,
-              action: 'click_button',
+              action: 'duo_chat',
               label: 'response_feedback',
               property: 'useful,not_relevant',
               extra: {
-- 
GitLab