Overriding variants trough local storage

Learn how to manually switch experiment variants using local storage for testing and QA. This method lets teams preview and validate variants without influencing…

1 min read


Pertento allows developers and QA teams to manually switch experiment variants directly through local storage. This method is intended for testing and verification and does not affect the live experiment configuration or real users.

How it works

Each experiment you have been exposed to is stored in local storage with a key such as:

PERTENTO_EXP_VAR {"5087":"12201"}

or


PERTENTO_EXP_VAR {"5087":"12201","5091":"12203","5110":"12200","5115":"12171","5118":"12198","5126":"12196","5145":"12104"}

The value for this key contains the assigned variant and experiment. In the above example 4846 indicates the experiment ID whereas 11365 is the variant ID.

By editing this value manually in your browser’s Developer Tools, you can force Pertento to load a specific variant.


Changes take effect immediately on page reload.

Purpose

Local storage overrides allow teams to:

  • preview specific variants
  • verify design and behavior
  • troubleshoot rendering issues
  • test tracking and conversion reporting
  • reproduce variant-specific bugs
  • check cross-page behavior for individual variants

Notes

  • This method is only for internal testing and QA.
  • Modifying local storage does not influence real traffic or experiment results.
  • Overrides persist until the local storage entry is changed or removed.
  • No URL-based variant forcing is currently supported.