1. Add the experiment to the `Gitlab::Experimentation::EXPERIMENTS` hash in [`experimentation.rb`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib%2Fgitlab%2Fexperimentation.rb):
1. Add the experiment to the `Gitlab::Experimentation::EXPERIMENTS` hash in [`experimentation.rb`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib%2Fgitlab%2Fexperimentation.rb):
...
@@ -50,7 +50,7 @@ addressed.
...
@@ -50,7 +50,7 @@ addressed.
# Add your experiment here:
# Add your experiment here:
signup_flow: {
signup_flow: {
environment: ::Gitlab.dev_env_or_com?,# Target environment, defaults to enabled for development and GitLab.com
environment: ::Gitlab.dev_env_or_com?,# Target environment, defaults to enabled for development and GitLab.com
tracking_category: 'Growth::Acquisition::Experiment::SignUpFlow'# Used for providing the category when setting up tracking data
tracking_category: 'Growth::Activation::Experiment::SignUpFlow'# Used for providing the category when setting up tracking data
}
}
}.freeze
}.freeze
```
```
...
@@ -111,8 +111,131 @@ addressed.
...
@@ -111,8 +111,131 @@ addressed.
end
end
```
```
1. Track necessary events. See the [product analytics guide](../product_analytics/index.md) for details.
### Implement the tracking events
1. After the merge request is merged, use [`chatops`](../../ci/chatops/README.md) in the
In order to determine whether the experiment is a success or not, we need to implement tracking events
to acquire data for analyzing. We can send events to Snowplow either via the backend or via the frontend.
See the [product analytics guide](../product_analytics/index.md) for more details.
#### Track backend events
The framework provides the following helper method that is available in controllers: