Update product analytics settings to be required only when flag is on
What does this MR do and why?
This MR updates the product analytics admin settings to make sure that we only require the settings needed for Jitsu or Snowplow depending on whether the :product_analytics_snowplow_support
flag is enabled.
It also updates the project settings to validate more settings and make sure that we don't require Jitsu or Snowplow specific overrides.
This means that we can be confident that when we remove the Jitsu related code, the Snowplow implementation will continue to work without issue.
I have also updated the feature specs to make them agnostic to which system we use and instead pass as much info as possible into the shared examples.
Screenshots or screen recordings
Snowplow disabled
Settings page | Expected outcome | Before | After |
---|---|---|---|
Admin settings | With Snowplow disabled, it should only require Jitsu properties | Screen_Recording_2023-06-08_at_11.48.26 | Screen_Recording_2023-06-08_at_11.48.26 |
Project settings | It should not require any properties to be overridden | Screen_Recording_2023-06-08_at_11.50.02 | Screen_Recording_2023-06-08_at_11.50.02 |
Snowplow enabled
Settings page | Expected outcome | Before | After |
---|---|---|---|
Admin settings | With Snowplow enabled, it should only require Snowplow properties | Screen_Recording_2023-06-08_at_11.48.26 | Screen_Recording_2023-06-08_at_14.04.49 |
Project settings | It should not require any properties to be overridden | Screen_Recording_2023-06-08_at_11.50.02 | Screen_Recording_2023-06-08_at_14.07.37 |
How to set up and validate locally
- Follow these instructions to set up Product Analytics in your GDK.
- When setting the admin or project-level settings, check that you only need to set the Jitsu related values and can skip Snowplow values.
- Set up a new project and onboard it with Jitsu via Project → Analytics → Dashboards.
- Track some events and page views for the project via the SDK.
- Confirm you can see the dashboards.
- Enable the Snowplow flag by running the command:
echo "Feature.enable(:product_analytics_snowplow_support)" | rails c
. - Update the admin or project-level settings to remove the Jitsu related values and add the Snowplow values.
- Set up a new project and onboard it with Snowplow via Project → Analytics → Dashboards.
- Track some events and page views for the project via the SDK.
- Confirm you can see the dashboards.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #413634 (closed)