Templates
Overview
Templates enable you to create a blueprint for gates/ experiments to enable standardization and reusability across your Project. Templates can help enforce a rollout sequence, or make it easy for new experimenters to get up & running with your standard team settings for experimentation.
Templates can be enforced at the Org (via Organization Settings and Role-based Access Controls) or at the Team-level. We will detail the various levels of controls and permissions you can enable for templates below.
Creating Templates
There are two primary ways to create a new template-
- From the Templates tab in Project Settings
- From a gate/ experiment you want to turn into a new template
Creating Templates from Project Settings
To create a new template from Project Settings, navigate to Settings -> Project Settings -> Templates and click the +Create New CTA, then select whether you want to create a gate or experiment template.
Converting an Existing Config into a Template
If you create a new config that you think would be useful to more folks on the team as a template, you can convert an existing (or currently being created) config into a template. To do this, in the config you wish to convert to a template, tap the "..." menu and select Save as Template. This will prompt you to name your template and add a description before saving.
Managing Templates
Templates can be managed via the Templates tab within Project Settings. Note that permissions for who can/ can't create or modify templates are managed via Statsig's Role-based Access Controls in the Project Settings -> Members -> Roles. By default Org and Project Admins can modify or delete any Template.
Creating Configs from Templates
To create a config using a template, at the time of config creation, select a template to apply from the template selector. If templates are required at the Organization or Team-level, the user will be blocked from proceeding with config creation until they've selected an approved template. The list of template options in the drop-down is configured at the team level (see below).
Managing Templates- Settings & Permissions
There are a few key layers of settings governing templates, namely at the-
- Org level
- Team level
Org-level Templates Settings
Within Experiment and Gate Policies (Organization Settings -> Organization Info -> Experiment Settings/ Gate Settings), you can enforce that a template is used for any new gate/ experiment creation. Only organization admins can configure this setting. NOTE that you must create at least 1 experiment/ gate template for users to choose if you toggle on this setting, otherwise they will be blocked in creating new configs.
Team-level Templates Settings
At the team-level, you can configure which templates members of that team can choose from at the time of config creation. You can also choose whether to require use of a template or not at the team level (note that this setting only applies if templates aren't already required at the organization-level, in which case that overrides any team-level configuration).
To configure team-specific templates, navigate to Settings -> Project Settings -> Members -> Teams -> choose a team -> Settings and then choose which templates are allowed for experiments and gates respectively.