ARCY AI

Consent

Wire your cookie banner or CMP to ARCY with three calls, know what a grant, a refusal and a withdrawal each do on the visitor's device, and read the answers in the dashboard.

ARCY writes nothing to a visitor's device until that visitor has accepted your own cookie policy. There is one consent, to your policy, and the widget only needs to hear the answer. The two policy links it shows live on the Consent card on Settings > Product.

Before you start

  • Your cookie policy must describe what arcy.js stores. Paste the cookie policy disclosure into it.
  • Save both policy links on the Product page. Until you do, the widget links ARCY's own policy pages instead.
  • Every call below needs init() to have run first. Called earlier, each logs a console warning and does nothing.

Setting it up

A visitor can say yes in two places, and both count. Your banner calls arcy.consent(true) on accept and arcy.consent(false) on reject. A visitor who reaches for the chat with no grant on record is asked there, in your voice, with your two links and one Accept button. Closing the panel means "not now" and the ask returns the next time they use the chat. There is nothing to configure per environment.

Three calls keep both sides on one answer:

ts
consent(granted: boolean): void
consentState(): "granted" | "refused" | null
onConsent(callback: (granted: boolean) => void): () => void

consentState() returns null when the visitor has never answered, or answered an older version of the disclosure and must be asked again. Use it to decide whether your banner shows. onConsent fires on every change from any source and returns an unsubscribe function. It is how an accept inside the chat reaches your CMP or Google Consent Mode.

A plain banner, on the HTML install path, which loads arcy.js asynchronously:

html
<div id="cookie-banner" hidden>
  We use cookies. <a href="/cookie-policy">Read more</a>
  <button id="cookie-accept">Accept</button>
  <button id="cookie-reject">Reject</button>
</div>

<script>
  arcy.on("ready", function () {
    var banner = document.getElementById("cookie-banner")
    if (arcy.consentState() === null) banner.hidden = false

    document.getElementById("cookie-accept").onclick = function () {
      arcy.consent(true)
      banner.hidden = true
    }
    document.getElementById("cookie-reject").onclick = function () {
      arcy.consent(false)
      banner.hidden = true
    }

    arcy.onConsent(function (granted) {
      if (granted) banner.hidden = true
    })
  })
</script>

Google Consent Mode, so an accept inside the chat unlocks your analytics too:

js
arcy.onConsent((granted) => {
  gtag("consent", "update", {
    analytics_storage: granted ? "granted" : "denied",
  })
})

A consent management platform. Check its state before writing to it, so the two never call each other in a loop:

js
cmp.onAccept(() => arcy.consent(true))
cmp.onReject(() => arcy.consent(false))

arcy.onConsent((granted) => {
  if (granted && !cmp.hasConsent()) cmp.acceptAll()
})

In React, one client component owns init(), the banner and the subscription, so nothing reads the state before the widget is ready.

What it changes

  • Grant. ARCY writes its anonymous id cookie and starts the session. What it writes from then on is listed on What ARCY collects.
  • Refusal. Recorded for six months. ARCY stops speaking first: a flow whose conditions match will not open on its own. The visitor can still reach for the chat, and the chat asks again.
  • No answer. A matching flow may raise the ask itself, because nobody has said no.
  • Withdrawal. A consent(false) after a grant. Collection stops, every cookie and key ARCY wrote is deleted, and the refusal is recorded. Nothing already stored on our side is deleted; erasure is a separate request.

Calling consent() with the answer already on record changes nothing. There is no consent control inside the widget's own settings sheet: your banner is where a visitor changes their mind.

Every answer also reaches ARCY. The Consent section on Users counts the live sessions that started in the range you pick: Sessions, Sessions that accepted split by banner and chat, Sessions that did not accept split by refused and never answered, and Sessions the chat won back with its share of all grants. Every number counts sessions, not people: a device that refused holds no identifier. A Consent column on the Users list and on an account's members shows each person's latest answer, Members accepted on Organizations counts the members whose latest answer is a grant, and Consent history on a person's page lists every answer with the session it was given in. An anonymous visitor who refused one day and accepted another appears there as two rows nothing can join.

See also

On this page