
Developer libraries tab, registered libraries with load-time telemetry.
What is on offer
Curated for now. The catalog is worker-authoritative and each entry is pinned to a specific version with an SRI hash. Adding a library takes a small PR to the catalog. Today, examples:splide@4.1.4, Splide carousel.glightbox@3.3.0, GLightbox lightbox.
Attach one
- In the variation editor for a variant, open the Libraries picker.
- Pick a library. It gets added to the variant’s dependency list.
- Save. The library’s starter code is appended to your variant’s JS if the starter is more than a stub.
Use it in variant JS
Inside your variant’s code, the library is available via a scoped accessor on the apply context:ctx.libs.get(key)returns the library’s default export.- The Promise resolves once the library has finished loading on the page.
- If you did not declare the library on the variant, the call throws
UndeclaredLibraryDependencyError. Add it to the picker first.
What the runtime actually does
On the first page a variant needing library X applies to, the runtime injects a<script> (or <link>) with the pinned URL and SRI hash and
waits for the load. On the second page, and for any other variant on
the same page that also needs X, the library is already loaded, the
picker’s second call resolves synchronously.
Libraries are hosted on jsDelivr today; the target endgame is
cdn.abtestly.com/lib/ which lets us pin, warm the cache, and skip a
third-party origin.
Diagnostic telemetry
The picker sends a tiny telemetry beacon per library load, start, resolve, and any load errors. That is what powers the load-time column in the Libraries tab under Site → Developer libraries. No per-visitor data goes to that dataset.Approve, deprecate, delete
Under Site → Developer libraries, workspace admins can:- Approve, mark a library as endorsed for the site.
- Deprecate, mark it as “please move off”, without breaking existing variants.
- Delete, refused (
409 in_use) while any variant still references it. Detach first, then delete.