Add change_dap_land_default_credits experiment
Summary
Adds change_dap_land_default_credits, a GLEX growth experiment behind a type: experiment feature flag (default_enabled: false), gated on the namespace.
The Customers Portal defaults the DAP Land SKU purchase-credits quantity to 5, and we suspect that default is causing underpurchasing. This experiment tests whether pre-filling 25 credits — closer to actual trial-account usage — reduces underpurchasing without hurting conversion. See the experiment issue: https://gitlab.com/gitlab-org/gitlab/-/issues/619294
How it works
The experiment is assigned per-namespace when the group billing page renders. In billing_plans_helper.rb, the candidate variant appends quantity=25 to the purchase-credits URL passed to the frontend, so the Customers Portal pre-fills 25 credits on load; control leaves the URL unchanged and the portal falls back to its own default of 5.
Tracking
Three funnel events, all carrying the experiment's gitlab_experiment context:
:assignment— published automatically when the experiment runs on the billing page render path.click_purchase_credits_dap_land_sku— fired client-side fromdap_monthly_credit_card.vuewhen the user clicks the purchase CTA.finish_purchase_credits_dap_land_sku— fired server-side fromprovision_service.rbafter a successfulgitlab_creditsprovisioning, scoped withonly_assigned: trueso namespaces never exposed to the billing page aren't segmented into the funnel. Provisioning updates and deprovisions also flow through this path, so conversion analysis should count distinct assigned namespaces rather than raw event counts.
All experiment code and specs live under ee/; specs cover both variants across the helper, experiment, provision service, and Vue component.
Validation steps
- Run GDK with SaaS simulation enabled by setting
GITLAB_SIMULATE_SAAS=1. - Use a top-level group on a free plan or an active trial, since paid non-trial groups render a different billing view without this card.
- In the rails console, toggle the variant with
Feature.enable(:change_dap_land_default_credits)for candidate orFeature.disable(:change_dap_land_default_credits)for control. - Visit the group's billing page at
/groups/<group-path>/-/billings. - On the GitLab Credits card, inspect the Purchase credits CTA link (
data-testid="dap-monthly-credit-card-cta-button"): the candidate variant's href containsquantity=25, while the control variant's href has noquantityparam. - Optionally verify via Snowplow Micro that rendering the page publishes the
:assignmentevent and clicking the CTA firesclick_purchase_credits_dap_land_sku, both carrying thegitlab_experimentcontext with the variant. - Note that the server-side
finish_purchase_credits_dap_land_skuevent fires when CustomersDot provisions thegitlab_creditsadd-on; this isn't easily exercised in a plain GDK, and is instead covered by the provision service spec.