Skip to content

Adjust tracking setup for hand raise lead button in trial status popover

What does this MR do and why?

To update the tracking on the hand raise lead button click event to use this.track instead of data attributes. This allows us to override event category, which is the problem with the original issue: #432779 (closed).

To achieve that without breaking current uses of hand raise lead button, the tracking mixin is also modified a bit to allow experiment context to be added from the setting tracking computed property, since currently the only way to do that is to have the experiment name passing in at mixins: [Tracking.mixin({ experiment: experiment_name })]

MR acceptance checklist

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

How to set up and validate locally

To interact with the trial status popover where the hand raise lead button is, and observe the events:

  1. Simulate SaaS and start GDK.

  2. Create a new private top level group, get the group id from group overview page.

  3. To observe the active-trial-status widget and popover, run the following command in rails console:

    Group.find(your_group_id).gitlab_subscription.update_columns(trial: true, hosted_plan_id: 7, trial_starts_on: 10.days.ago, trial_ends_on: 10.days.from_now)

    You should see the active-trial-status widget in the sidebar, hover over it will display the popover. Click Contact sales button will trigger hand raise lead form modal.

  4. In snowplow debugger extension (install if not present), observe the events

Related to #432779 (closed)

Edited by Roy Liu

Merge request reports