- Fork this repository to get started.
- In your forked repository, add your Statsig Console API Key to GitHub Secrets.
- Tailor the metric definitions to align with your data needs.
- Verify the automation by modifying relevant files and observing the triggered GitHub Action.
Detailed Guide
Forking the Repository
- Fork this repository to create a copy in your GitHub account.
Adding the Statsig Console API Key
- Navigate to
Settings > Secrets and variables > Actionsin your repository settings. Create a new secret namedSTATSIG_API_KEYwith your Statsig Console API key as its value. This key facilitates authentication with the Statsig Console API for the synchronization process.
Customizing Metric Definitions
-
Metric definitions reside within the
./metricsdirectory, and metric source definitions are found in the./metric_sources/directory. To customize:- Utilize the Statsig Console API to fetch an existing metric_source or metric using GET requests for metric sources and metrics.
- Remove the provided example metrics and metric sources, and replace them with your definitions in
./metric_sources/*.ymland./metrics/*.yml.
metric.warehouseNative[] to metric.metricDefinition[] in our examples. You can see this change here. Feel free to adjust the translations or revert to using metric.warehouseNative[] in your definitions.
Verifying Automation
- To test, edit a metric or metric source description in your repository. This action should trigger the GitHub Action, visible under the
Actionstab. The process will then either create or update your metrics and metric sources in Statsig based on the repository’s semantic definitions.
This example serves as a basic template. We encourage testing and further development to meet production standards. Please share any feedback or improvements you’ve made to this workflow with our support team, your sales contact, or in our Slack community. Thank you for any contributions!