is-test Flag
Definition
This document provides a detailed walkthrough of the usage for is-test flag
Is test flag in Loader(configuration) Script
Once a user include is-test=true in the query parameters users or requests will be excluded from A/B participation
<script type="module" src="https://optifyr.com/pulse/{{appName}}/module/pulse.js?include=settings,tracker&prefetch=tag1,tag3&is-test=true" async ></script>
<script nomodule src="https://optifyr.com/pulse/{{appName}}/nomodule/pulse.js?include=settings,tracker&prefetch=tag1,tag3&is-test=true" async ></script>
Note: is-test will be accessible in Pulse SDK versions 1.54.1 or later.
is-test based Segmentation in Settings SDK
Upon initializing the settings SDK, it will cache any prefetch settings and, if the is-test flag value is present in localStorage, it will store this 'is-test' value in the indexedDB record for each setting.
When a user attempts to retrieve a setting, the SDK will verify whether the is-test value in localStorage differs from the cached value. If there is a mismatch, the SDK will clear the cache. Otherwise, the cached settings will be considered valid.
If the cached setting is deemed valid, the SDK will provide the cached setting. However, if the cached setting is not valid or there is no cached setting, the settings SDK will initiate a fetch call to obtain the latest settings, including the is-test value in the request URL.