Fix Duo panel identity verification empty state click tracking

What does this MR do and why?

The "Verify my account" button in the Duo panel identity verification empty state (ee/app/assets/javascripts/ai/duo_agentic_chat/components/identity_verification_empty_state.vue) still used the legacy click-tracking pattern: data-event-tracking="click_link" with the specific event name only in data-event-label. That pattern only ever sends the generic click_link Snowplow event — the backend rejects it as an unknown event, and on instances with gl.onlySendDuoEvents it is dropped entirely.

This MR binds data-event-tracking directly to the specific internal event click_duo_agentic_identity_verification_empty_state_verify_account (the constant already exists in DUO_PANEL_EMPTY_STATE_EVENTS). It fixes the same legacy pattern on three sibling elements: the "Learn more" link in access_denied_empty_state.vue, and the "Start a Free Trial" and "Learn more" buttons in start_trial_empty_state.vue. Each now binds data-event-tracking to its specific event constant (CLICK_LEARN_MORE or CLICK_START_TRIAL). The event definitions for these already exist. The MR also:

  • Adds the event definition ee/config/events/click_duo_agentic_identity_verification_empty_state_verify_account.yml (mirroring the existing view_duo_agentic_identity_verification_empty_state definition).
  • Adds a Jest spec asserting the click fires the correct event via bindInternalEventDocument / triggerEvent.

References

How to set up and validate locally

  1. Run the spec:
    yarn jest ee/spec/frontend/ai/duo_agentic_chat/components/identity_verification_empty_state_spec.js
  2. Confirm the "Verify my account" button now renders data-event-tracking="click_duo_agentic_identity_verification_empty_state_verify_account" (and no data-event-label).

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Roy Liu

Merge request reports

Loading
Loading