New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Official Metrics #2007
Merged
Merged
Official Metrics #2007
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changes: - [ ] Allow creating new metrics via the UI even when you are using config.yml - [ ] Allow creating segments and dimensions via the UI even when using config.yml - [ ] Add support for fact tables/metrics to config.yml - [ ] Add an 'official' badge to anything that is defined via config.yml - [ ] Testing - [ ] Documentation
Your preview environment pr-2007-bttf has been deployed. Preview environment endpoints are available at: |
Deploy preview for docs ready! ✅ Preview Built with commit a314dd9. |
just noticed this - happy to help test it out whenever it's ready! |
8 tasks
itsgrimetime
pushed a commit
to itsgrimetime/growthbook
that referenced
this pull request
Jan 30, 2024
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
There should be a distinction between "official" metrics (version controlled, vetted by data team, tested, etc.) and "ad-hoc" metrics which anyone can create.
Official metrics are locked down and cannot be edited from the GrowthBook UI. Changes must be made wherever they are being version controlled instead (e.g. a git repo). Official metrics should also be visually distinct in the UI (e.g. with a badge) so people know they can trust them.
Screenshots
"Official" badge with tooltip added everywhere we render the metric name.
Managed By
There are 3 different places people manage their GrowthBook metrics:
config.yml
file (self-hosted only)This PR adds a new
managedBy
property to metrics, fact tables, fact filters, and fact metrics. It has 3 possible values:""
(empty string) - can be managed via both the UI and REST API"api"
- can only be managed via the REST API"config"
- can only be managed via aconfig.yml
file. This is only for regular metrics, not fact tables/filters/metrics for now.By default, we will infer this value. Anything defined in
config.yml
will get a value of"config"
. Everything else will get a value of""
(empty string). When creating/updating resources via the REST API, you can opt-in to setting this field to"api"
to lock down the UI.For now, we have simple logic to determine official status. If the
managedBy
property is empty, it is "ad-hoc", otherwise it is considered "official". We may make this more explicit in the future.Config.yml Changes
There is a new environment variable
ALLOW_CREATE_METRICS
. When set to true, new metrics can be created via the UI even whileconfig.yml
is being used. This creates 2 classes of metrics - Official ones that can only be changed viaconfig.yml
and "ad-hoc" metrics that can be managed via the UI.GitHub Metrics Guide
New guide in docs about how to store fact table and metric definitions in a GitHub repo and sync them to GrowthBook automatically via the
/bulk-import/facts
REST endpoint.Testing
config.yml
, regular metrics marked as Official and cannot be edited in the UIconfig.yml
, you can create new metrics and edit them in the UI (only whenALLOW_CREATE_METRICS
env var is true)Future Work
config.yml
, the API, and the UI for Segments and Dimensionsconfig.yml
strictness for organization settings. For example, if 3 org settings are defined in config.yml, block those 3 from being edited in the UI, but still allow editing other settings.