Track how projects are created in GitLab
Created with the help of GitLab Duo.
We currently lack a systematic way to track how projects are created in GitLab. This makes it difficult to:
- Debug issues where we need to understand the user's creation path
- Analyze usage patterns across different creation methods
- Build accurate funnels for product analytics
- Differentiate between API and UI-initiated actions
Proposal
Add tracking fields to the project entity(?) to capture creation context. This could be
Option A: Two separate fields
-
creation_method: How the project was created (e.g., blank_new, template, url_import, direct_transfer, github_import, bitbucket_import, manifest_import, gitea_import, etc.) -
creation_channel: Where the action was initiated (e.g., ui, api)
Option B: Single combined field
-
creation_source: Combined value (e.g., ui_blank_new, api_github_import, api_direct_transfer)
Considerations
-
Congregate: This is a Professional Services wrapper around our APIs, so it might appear as
apiin the channel field, which seems appropriate - Retry flows: Is there any concern about Failed project imports that are retried not retaining their original creation method
- Existing projects: We'd need to decide whether to backfill existing projects (likely not feasible) or only track going forward
Open questions
- Which option (A or B) better serves our analytics needs?
- Should this live on the
projectstable directly or in a separate table? - What level of granularity do we need for import sources?
- Any edge cases to be aware of like projects created via Rails console or database seeding?
Useful links
https://docs.gitlab.com/user/project/import/repo_by_url/#import-a-project-by-using-the-api
Want me to adjust the tone, add more technical detail, or restructure any sections?
Edited by Oiza Baiye