Skip to content

Add tracking events for trial reassurance experiment

What does this MR do?

Adds frontend tracking events (Snowplow) and records experiment subjects in our database for the Trial Registration Reassurance experiment.

Screencast (by means of Loom)

Trial Registration Reassurance experiment – tracking walkthrough - Watch Video on Loom

How to setup and validate locally

  1. Follow these steps to install & enable Snowplow Micro in your local development environment
  2. Make sure trials are enabled on your GitLab instance
    ApplicationSetting.first.update(check_namespace_plan: true)
  3. Enable the experiment feature flag:
    Feature.enable(:trial_registration_with_reassurance)
  4. It will be easier to test locally if you bypass these CustomersDot API response checks:
    # ee/app/services/gitlab_subscriptions/create_lead_service.rb, line 8
    if response.success || true
    
    # ee/app/services/gitlab_subscriptions/apply_trial_service.rb line 8
    if response.success || true
  5. Navigate to /-/trial_registrations/new and begin the process
    • Check the /micro/good endpoint of Snowplow Micro to see the Structured Events (se types) in action
    • After the initial registration page submission, check the database for the ExperimentSubject record:
      es = ExperimentSubject.last
      es.experiment # make sure it's for the right experiment
      es.user # make sure the new user you created is here

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #335439 (closed)

Edited by Dallas Reedy

Merge request reports