Set up initial onboarding decision tree for product analytics
This MR adds onto the work done in Set up new file structure for onboarding split ... (!105809 - merged).
This MR adds the start of the decision-making process for the onboarding flow. It checks if the jitsuKey
exists and if the Cube API returns any data.
Based upon the results it either sends the user to the onboarding flow or dashboards listing.
To help validate this, I have added a feature spec to check the decision-making process end-to-end.
MR | Step |
---|---|
Set up new file structure for onboarding split ... (!105809 - merged) | |
Set up initial onboarding decision tree for pro... (!105811 - merged) |
|
Screenshots or screen recordings
Situation | Screencast |
---|---|
Unknown error | Screen_Recording_2022-12-02_at_12.41.27 |
Onboarding incomplete | Screen_Recording_2022-11-25_at_14.20.12 |
Onboarding complete | Screen_Recording_2022-11-25_at_14.19.43 |
How to set up and validate locally
Make sure you are on at least GitLab Premium.
- Enable the feature flag:
echo "Feature.enable(:cube_api_proxy)" | rails c
. - Set up the devkit and start it running using
docker-compose up
. - Visit admin settings and make sure that the settings have been set:
/admin/application_settings/general#js-product-analytics-settings
. - Visit a dashboard on a project that hasn't been set up yet:
/[GROUP]/[PROJECT]/-/product_analytics/dashboards/
. - Validate the onboarding app is shown.
- As an authenticated user who has developer+ access to the project, make the following GraphQL call:
mutation {
projectInitializeProductAnalytics(input: { projectPath: "[PATH_TO_PROJECT]" }) {
project {
fullPath
}
errors
}
}
- Refresh the page and check that the onboarding app is still being shown.
- Generate some events for the project, in groupproduct analytics we've been using a browser extension like tapermonkey + this userscript to generate events.
- Using the userscript above you need to change the host to your devkit's Jitsu URL and use your Jitsu key created for the project (under
project.project_settings.jitsu_key
).
- Using the userscript above you need to change the host to your devkit's Jitsu URL and use your Jitsu key created for the project (under
- Once events have been created, refresh the dashboard page and check the dashboard listing is shown.
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 #381315 (closed)
Edited by Robert Hunt