SDK
SDK 0.11.0
- Experiments (A/B tests): a page that has a running experiment arrives with
experiments(CmsExperiments), which carries every variant: only the blocks a variant changes (swap), its whole block list when it adds, removes or reorders blocks (components), and its page fields when they differ.CmsPageandCmsLivePagerender each tested part once per variant in wrappers withdisplay: contents, and an inline script picks the visitor's variant before the page paints, so there is no flicker and the page stays the same for everyone in every cache. Variants carrydata-nosnippet. It counts views of the tested part and the experiment's goals and sends them to CMS Orbit. Nothing to change for websites that render withCmsPage. withExperiments(request, response)from the new@bifrost-orbit-cms/sdk/next/experimentsentry point gives each visitor a daily variant without cookies: call it inproxy.tsand setCMS_EXPERIMENTS_SECRET.experimentSeed(request)returns the seed for your own proxy.CmsExperimentsadds the script to templates that don't useCmsPage, so goals on their pages count.useExperimentPage(page)lays the visitor's variant over the page's fields.convertExperiments(name)counts an event as a goal, and Insights Orbit'sinsights.trackevents count by themselves.experimentsConsent(true)tells experiments the visitor has accepted cookies; Google Consent Mode'sanalytics_storageandwindow.cmsOrbitConsentwork too.fnv1a,experimentBucket,experimentArmandexperimentVisitorKeyare exported, the same bucketing other SDKs and servers use, with test vectors in the documentation.createRevalidateHandlerrefreshes every page on the newexperiments.changedwebhook.- With Insights Orbit on the page, the
Experiment viewedevent carries the variant's key asarmnext to its name, and waits forwindow.insightsif the Insights script loads after the experiment is seen. Insights Orbit then splits its reports, goals and funnels by experiment and variant for the rest of the visit, without a cookie.