Documentation

Install Abrantes, create experiments, and add the plugins you need.

Start here

Install Abrantes

Pick the core build or AbrantesPlus (core + plugins) and add it to your site.

Installation guide →

Create experiments

Define variants, assign users, render changes, and persist the result.

Experiment basics →

Use plugins

Connect Abrantes with analytics and tools like GA4, GTM, Hotjar, and Matomo.

Plugin reference →

Customize the build

Swap plugins in or out and rebuild AbrantesPlus with gulp.

Custom build steps →

Core workflow

Most experiments follow the same sequence. Keep your base page as control, then let Abrantes render variants when assigned.

<script src="AbrantesPlus.min.js"></script>
...
<script>
  var PricingTest = Object.create(Abrantes);
  PricingTest.variants = [
    function () { /* control is the default page */ },
    function () { document.querySelector(".cta").textContent = "Start free trial"; }
  ];
  PricingTest.assignVariant("PricingTest");
  PricingTest.renderVariant();
  PricingTest.persist("cookie");
  PricingTest.add2dataLayer("example_test");
</script>
  1. Create a test object from Abrantes.
  2. Define variants as an array of functions that modify your page. One function per variant.
  3. Assign a variant to the user with assignVariant.
  4. Render the variant in the page.
  5. Persist the same variant with a cookie or local/sessionStorage.
  6. Add the experiment to the dataLayer to be tracked (tracking may vary by your analytics tool).

More resources

Examples page

Browse real examples like cross-site tests, waitFor, redirects, and analytics plugins.

Go to examples →

Use as a module

Try Abrantes in a page without modiying your templates. The easiest way to get started!

Open module example →

GitHub repository

Explore the source, open issues, or grab the latest version.

Open GitHub →