Skip to guide
Macaron Docs

Banners, text changes and experiments

Change what visitors see on your website from Macaron, through the script you already installed, with no deploy.

Before you start

Install the Macaron website snippet from your website’s Chat installation page. Site control works with chat and analytics off. Open Apps, your website, then Site. Changes reach open pages within about a minute and new page loads straight away. Adding and changing is part of Pro. If you leave Pro, what is on keeps running and you can always turn it off.

Banners

One line of text at the top or bottom, with an optional link to a page on your site or a full https address. Choose pages like /pricing, or /docs/* for everything under /docs, and an optional start and end. A visitor who closes a banner does not see it again until you change it.

Flags in your HTML

Show an element only while a flag is on, or only while it is off. Elements added later by your framework are covered too.

<section data-macaron-flag="new_pricing">…</section>
<section data-macaron-flag-off="new_pricing">…</section>

Flags in your code

The script loads after your page, so wait for it. The second argument is the answer to use when a flag does not exist. The last known answer is kept in the browser for a day, so a repeat visit does not flicker. With Next.js, run this from the Script component’s onLoad instead, because it can load after the page.

addEventListener('load', async () => {
  const flags = window.MacaronSupport?.flags;
  if (!flags) return;
  await flags.ready;
  if (flags.isOn('new_pricing', false)) showNewPricing();
  flags.onChange(() => render());
});

Roll out gradually

Set a share of visitors. Each browser gets a stable answer for each flag, and raising the share only adds people. It counts browsers, not people: a visitor with two devices can get two answers. Flag names and states are readable in the browser. A flag hides interface; never use one to protect private data or a paid feature.

Surveys

One question in the corner of the pages you choose, with two to six answers, a written answer, or both. Each browser is asked once, and a page shows at most one. They are accepted only from the exact address saved for the website, so www.example.com and example.com are different. Answers are anonymous: no cookie, name, address or identity is stored, only the answer and the page path. A survey holds 200 answers and a website 1,000. Anyone who can open your site can answer, so treat results as notes rather than a measured vote.

Text changes

Change words on your pages without touching code. Copy one whole piece of text as it appears; bold or linked words inside a sentence are separate pieces. Every match on the chosen pages changes, and a link can point somewhere new. Text goes in as text, never HTML. Turn it off and your own words come back. Search engines and visitors without JavaScript still see your original text, so make a lasting change in your code too.

Experiments

Half of the browsers on the chosen pages get different text, or a flag turned on. Choose one goal: a page they reach, or the words on a button or link they click. Macaron calls a result only after 7 days, 100 visitors in each group and 20 goals, at 95%, and refuses to call one when the two groups are not the same size. Watching every day and stopping at the first good number finds winners that aren’t there. Keep the new version to give it to everyone. Changing what is tested starts the count again.

What an experiment collects

Each browser in a test sends a random id made for that test, the version it saw and whether it reached the goal. No address, cookie or identity is stored, and the id is stored hashed. Browsers with Do Not Track or Global Privacy Control, without your analytics consent when your snippet requires it, or that cannot keep the id, are in neither group and see the page as it is. Numbers go when you delete the experiment, and no later than 90 days after its last visitor. An experiment holds 50,000 visitors and five can run at once.

Let an agent propose changes

An agent with full control can do all of this for you, straight away. With less access it drafts the change: you see every field and what would change, then publish or reject it in Drafts.