---
title: "Coordinating Your Site with the Quikly Test Group"
description: "How Quikly handles A/B test split groups, and how to detect whether a visitor is in the Quikly half if you want to coordinate your own site elements."
---

When you run Quikly as an A/B test — for example, showing the campaign to 50% of visitors via [Visibility Percentage](/shopify/tutorials/visibility-controls/) — a common question is: *can I tell which visitors are in the Quikly half, so I can keep other site elements consistent?*

Here's how we think about it, and what's available if you need to drive your own logic off the split.

## The control group is left untouched

For the **control (BAU) group** — the visitors who don't get Quikly — we intentionally don't touch anything. Those shoppers get your normal site experience with no Quikly footprint, which keeps the test clean: any lift you measure is attributable to Quikly, not to a side effect of the test setup.

## Let Quikly account for coordinating changes

For the **Quikly group**, the ideal is that Quikly handles any coordination on your behalf, rather than you detecting the split and reacting to it yourself.

The most common example is other on-site popups overlapping the campaign. Quikly has a built-in **"hide other popups"** setting that suppresses competing popups whenever the Quikly campaign is visible — and only for the Quikly group, since the control group never triggers it. If that's the coordination you're after, your account team can enable it on the campaign and you don't need to write any code.

If there's a coordinating change you'd like Quikly to handle, ask your account team first — there's a good chance we can do it on our side.

## Detecting the Quikly group yourself

If you want to conditionally show or hide *your own* site elements based on the split, you can read Quikly's first-party `q_visibility` cookie on the client. When a visitor is placed in the Quikly half, the cookie holds an entry set to `true`.

This helper returns `true` when a Quikly campaign is showing for the visitor:

```js
function isQuiklyVisible() {
  var match = document.cookie.match(/q_visibility=([^;]+)/);
  if (!match) return false;
  var visibility = JSON.parse(decodeURIComponent(match[1]));
  return Object.keys(visibility).some(function (key) {
    return !key.startsWith("v_") && visibility[key] === true;
  });
}
```

Run it on a short delay so Quikly's script has time to load and make the assignment, then coordinate your own elements:

```js
setTimeout(function () {
  if (isQuiklyVisible()) {
    // visitor is in the Quikly group —
    // e.g. hide your own competing popup
  }
}, 1000); // 1s is usually plenty
```

### Two things to keep in mind

- **Give it a moment.** The group assignment is made client-side just after Quikly's script loads, so the cookie isn't guaranteed to be there on the very first render. The `setTimeout` above handles this — bump it to `1500`–`2000`ms if your page loads slowly. This approach fits elements that aren't first-paint-critical, like a delayed popup, better than something that must be correct the instant the page paints.
- **Check for "visible," not "not visible."** Only an explicit `true` means a campaign is showing. A missing or `false` entry can mean the visitor is in the control half *or* that a campaign was hidden for another reason (sold out, repeat visitor, a URL rule, and so on) — so treat the helper as "is Quikly showing?" rather than "is this visitor in the control group?"

---

Not sure which approach fits your test? Reach out to your account team — if you tell us the specific element you're trying to coordinate, we can usually handle it on our side.