On this page

Feature Gate overrides

During development, it can be useful to explicitly state which users should pass or fail a given feature gate. This is where overrides come in.

Override results of a feature gate

During development, you may need to explicitly state which users should pass or fail a given feature gate. Overrides let you do this.

Overrides are based on user IDs and you can set them to pass or fail for a given user ID. When Statsig evaluates a gate, if the user ID has an override, Statsig returns the overridden result immediately before evaluating any rules.

Adding an override

  • Log into the Statsig console at https://console.statsig.com
  • On the left-hand navigation panel, select Feature Gates
  • Select the feature gate where you want to add an Override
  • Click the Add Override button

Feature gate page with Add Override button highlighted

  • Select either 'Pass List' or 'Fail List' from the tabs in the dialog

Manage overrides dialog showing pass and fail lists

  • For users you want to pass the gate, add them to the 'Pass List'

  • For users you want to fail the gate, add them to the 'Fail List'

    A user can only exist on one of these lists at a time.

  • After you have added the user IDs, select Save

Deleting an override

If you add an override but later decide it isn't needed, you can remove it so Statsig evaluates the rules normally.

  • Log into the Statsig console at https://console.statsig.com
  • On the left-hand navigation panel, select Feature Gates
  • Select the feature gate where you want to add an Override
  • Click the Edit Overrides button

Edit overrides button within feature gate settings

  • Select the trashcan icon next to the user ID you want to remove from a list.

    Override list with trash icon to remove user ID

  • After you have updated the lists, select Save

Testing an override

After you add your override, you can test it in the Test Gate window by adding userID as a property of the user object.

Test gate console showing user object with override result

Users that pass see "PASS (User ID Override)"

Test gate output indicating PASS due to user ID override

Users that fail see "FAIL (User ID Override)"

Test gate output indicating FAIL due to user ID override

Was this helpful?