Consent
Ta treść nie jest jeszcze dostępna w Twoim języku.
Quomerce follows your consent banner. Choose the Consent mode in Analytics settings.
The two modes
Section titled “The two modes”Required (wait for the banner) is the default. Until the visitor agrees, nothing is stored on the device, each page looks like a new visit, and no replay is recorded.
Not required starts storage and replays right away. Use it only if you are sure you may.
Pass on the choice
Section titled “Pass on the choice”The script does not remember the choice. Call consent on every page load, as soon as the choice is known, and again when it changes:
// The visitor agreed to statisticsqm("consent", { analytics: true, replay: true });
// The visitor declinedqm("consent", { analytics: false, replay: false });| Field | Allows |
|---|---|
analytics |
Storing the session and visitor ids on the device (cookies). |
replay |
Recording the session replay. It also needs analytics. |
Withdrawing consent (analytics: false) deletes the script’s _qm_* cookies.
Examples
Section titled “Examples”window.addEventListener("CookiebotOnConsentReady", () => { const ok = Cookiebot.consent.statistics; qm("consent", { analytics: ok, replay: ok });});myBanner.onChange((choices) => { qm("consent", { analytics: choices.analytics, replay: choices.analytics });});For Next.js, see Pass on consent.