Skip to content
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. CmsPage and CmsLivePage render each tested part once per variant in wrappers with display: 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 carry data-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 with CmsPage.
  • withExperiments(request, response) from the new @bifrost-orbit-cms/sdk/next/experiments entry point gives each visitor a daily variant without cookies: call it in proxy.ts and set CMS_EXPERIMENTS_SECRET. experimentSeed(request) returns the seed for your own proxy.
  • CmsExperiments adds the script to templates that don't use CmsPage, 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's insights.track events count by themselves. experimentsConsent(true) tells experiments the visitor has accepted cookies; Google Consent Mode's analytics_storage and window.cmsOrbitConsent work too.
  • fnv1a, experimentBucket, experimentArm and experimentVisitorKey are exported, the same bucketing other SDKs and servers use, with test vectors in the documentation.
  • createRevalidateHandler refreshes every page on the new experiments.changed webhook.
  • With Insights Orbit on the page, the Experiment viewed event carries the variant's key as arm next to its name, and waits for window.insights if 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.