Skip to content

Allow us to record conversion events for experiment participants

What does this MR do?

  • Adds a converted_at TIMESTAMP WITH TIME ZONE column to the experiment_users table so that we can record when the user took the desired action for the given experiment.
  • Adds the record_experiment_conversion_event helper method to all controllers for convenience (via the Gitlab::Experimentation::ControllerConcern)
  • Adds supporting methods to the Experiment model

Migration results

Up

== 20201106193452 AddConvertedAtToExperimentUsers: migrating ==================
-- add_column(:experiment_users, :converted_at, :datetime_with_timezone)
   -> 0.0024s
== 20201106193452 AddConvertedAtToExperimentUsers: migrated (0.0025s) =========

Down

== 20201106193452 AddConvertedAtToExperimentUsers: reverting ==================
-- remove_column(:experiment_users, :converted_at, :datetime_with_timezone)
   -> 0.0010s
== 20201106193452 AddConvertedAtToExperimentUsers: reverted (0.0024s) =========

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] 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 #255979 (closed)

Edited by Dallas Reedy

Merge request reports

Loading