Consent
Quomerce follows your consent banner. You 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 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.
Pass on the choice
Section titled “Pass on the choice”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 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.