Skip to guide
Docs & Help
Ctrl / ⌘ K
Tracking and privacy

Set up and test cookie consent

When your setup requires analytics consent, keep Attriboo blocked until the visitor agrees. New code from Setup waits for a consent callback by default. It does not add a cookie banner to your website or connect itself automatically to your consent manager. Ask the person managing your site to configure and test the full flow.

Instructions reviewed

Handle withdrawal

Prevent the tracker from loading on future pages. If it is already running, window.attriboo.disable() stops its event sending in the current page. Removing a script element alone does not stop code and listeners that have already run.

The consent(false) and disable() calls stop events, remove the tracker's browser identifier on the current origin and matching cookie domains, undo tracker-added checkout link identifiers, remove the poll, and attempt to clear the active Shopify cart identifier. They do not erase earlier server records or identifiers already sent to a payment provider. Review other origins, checkout metadata, downloads and integrations separately.

When the visitor agrees again, call window.attriboo.consent(true). The tracker resumes with a fresh browser identifier without installing a second copy. Global Privacy Control and Do Not Track keep tracking off. Test this path as well as reloads and navigation.

Stop an already-running tracker on the current page
if (window.attriboo) {
  window.attriboo.disable();
}

Test every choice on the published website

Test in a fresh browser profile, then repeat with a previously saved choice. If your policy handles browser privacy signals, verify those paths too. Do not bypass a visitor's rejected choice to make a connection test succeed.

StateCheck in the browser's Network and storage tools
Before a choiceNo Attriboo collection requests or tracker-created identifier storage when consent is required.
RejectNo Attriboo events after navigation, reload, form submission or checkout interaction.
AcceptThe script loads once, the expected visit arrives for the correct website, and only the intended identity features run.
Withdraw after acceptingEvents stop immediately and after navigation/reload; relevant identifiers are removed. Check all tracked subdomains.
Grant permission againThe consent(true) callback resumes tracking once with a fresh identifier. Reloads still follow your saved choice.

Understand the effect on reports

Visitors who decline tracking may not have a recorded journey. Payments can still arrive through a connected provider without matching recorded visits. Consent choices, cleared storage and browser restrictions can all reduce attribution completeness; missing journeys do not by themselves mean the payment connection failed.

You are done when

A fresh visit, reject, accept, withdrawal and a later permission change all behave as intended on your published site.

Still need a hand?

Send a question without needing to sign in.

Open support form