Skip to content

Consent

Quomerce follows your consent banner. You choose the Consent mode in Analytics settings.

Required (wait for the banner) is the default. Until the script is told the visitor agreed:

  • no cookie or storage key is written on the device;
  • ids live in memory for one page load only, so each page looks like a new visit;
  • events are still sent, marked as sent without consent;
  • no replay is recorded.

Not required means your shop takes responsibility for consent in another way. Storage and replays start right away. Use it only if you are sure you may.

The script does not remember the visitor’s choice. Your consent tool does. Call consent on every page load, as soon as the choice is known, and again whenever it changes:

// The visitor agreed to statistics
qm("consent", { analytics: true, replay: true });
// The visitor declined
qm("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.

Cookiebot
window.addEventListener("CookiebotOnConsentReady", () => {
const ok = Cookiebot.consent.statistics;
qm("consent", { analytics: ok, replay: ok });
});
Any banner with a callback
myBanner.onChange((choices) => {
qm("consent", { analytics: choices.analytics, replay: choices.analytics });
});

For Next.js, see Pass on consent.