Allow us to record conversion events for experiment participants
requested to merge 255979-add-converted_at-timestamp-column-to-the-experiment_users-table into master
What does this MR do?
- Adds a
converted_at TIMESTAMP WITH TIME ZONE
column to theexperiment_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 theGitlab::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
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides - [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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