/Docs

Developer Reference

This section covers everything developers need to go beyond the basics. You will find a complete reference for the JavaScript SDK that the snippet exposes on your pages, documentation for the command-line tool that lets you build and test experiment code locally, the Chrome extension that powers the local development workflow, and a guide to personal access tokens for CLI authentication and API access.

What is available

A vs B ships four developer-facing tools. You do not need all of them for every experiment, but knowing what each one does will help you choose the right tool for each task.

  • Snippet SDK (window.avsb) — The public JavaScript API exposed by the snippet on every page where it runs. Use it to track custom events, assign visitor segments, force variations for QA, wait for dynamic elements to appear, and integrate with third-party analytics tools.
  • CLI tool + Chrome extension — A command-line interface and browser extension that let you clone an experiment to your local machine, edit variation code in your own IDE with TypeScript and SCSS, see live changes in Chrome as you save, and push finished code back to the platform.
  • Personal access tokens — Long-lived tokens tied to your account that authenticate the CLI tool. You can create and revoke tokens from your account settings.

In this section

Quick start for developers

If you just want to get the local dev workflow running as fast as possible:

  1. Create a personal access token.
  2. Follow the Local Development guide — it covers CLI installation, extension setup, and the full end-to-end workflow.