Skip to Content
StarsellDocs
Settings

Privacy and cookies

The cookie banner and where it shows, waiting for consent before analytics and marketing tags, the "Do not sell or share" link, and how tags read the visitor's choice.

Settings > Privacy and cookies sets the storefront's cookie banner, whether analytics and marketing tags wait for a visitor's consent, and the "Do not sell or share my information" link that US privacy laws ask for.

Everything here saves with the save bar. Each change is written to the Activity log.

The banner asks visitors before analytics and marketing cookies. It has three buttons:

  • Accept all - analytics and marketing on.
  • Reject - both off.
  • Choose - a switch each for Analytics and Marketing, then Save choices. Necessary cookies (the cart, checkout, the visitor's language and market) are always on.

It takes the theme's colors, fonts and corners, so it fits every theme, uploaded ones too. On a computer it sits in a bottom corner; on a phone it is a sheet along the bottom of the screen. It never blocks the page: visitors can scroll and shop before they answer. If the market banner shows too, it moves up above it.

Where it shows

ChoiceWho sees the banner
Off (the default)Nobody.
EverywhereEvery visitor, until they choose.
Europe onlyVisitors from the EU, the EEA (Iceland, Liechtenstein, Norway), the UK and Switzerland.

The visitor's country comes from the hosting edge (Seylo, Cloudflare or Vercel). With Europe only, a visitor whose country isn't known sees the banner too: asking is the safe side.

With the banner on, the footer gets a Cookie settings link, after the policies, that opens the choices again. Any link on the store to #cookie-settings does the same, so you can add one to a page or a menu.

Leave it empty for the default wording ("We use cookies to run the store and, if you agree, to see how it is used and to show you relevant ads."), or write your own per language. When the store has a privacy policy, the banner links to it.

How long a choice lasts

The choice is kept in a cookie on the visitor's browser for six months, for this store only. Then the banner asks again. When the banner starts asking something new in a later version of Starsell, earlier choices are asked again too.

Wait for consent (on by default) applies where the banner shows:

  • On - analytics and marketing tags wait until the visitor accepts them. This is what the EU and the UK require.
  • Off - tags run right away and stop once the visitor rejects them.

Visitors who don't get the banner (it is off, or they are outside Europe with Europe only) count as having agreed. A visitor's own choice always wins, wherever they are: someone who rejected marketing, or opted out on the "Do not sell or share" page, stays opted out.

Do not sell or share

For US privacy laws such as California's (CCPA/CPRA). Turn on "Do not sell or share my information" link and the footer links to /privacy on the store.

On that page a visitor clicks Opt out:

  • Marketing cookies turn off in that browser, the same as turning Marketing off in the banner's choices.
  • If they are signed in to their customer account, their customer record gets the tag do-not-sell and a line in the activity log, once. Use the tag to leave them out of ad audiences you export.
  • When the store has customer accounts and the visitor isn't signed in, the page offers to sign in first so the choice is kept on the account too.

Every storefront page sets window.starsellConsent as it loads, ahead of the page's own content:

window.starsellConsent // { analytics: true, marketing: false, decided: true }
  • analytics and marketing - whether those tags may run now.
  • decided - whether the visitor has chosen. false means the banner is still waiting for an answer.

When the choice changes, the page dispatches a starsell:consent event on window with the new values in detail. A tag that needs marketing consent, Meta's pixel for example, waits like this:

const run = () => {
  /* load the pixel */
}
const ready = c => c && c.marketing
if (ready(window.starsellConsent)) run()
else
  window.addEventListener('starsell:consent', function wait(e) {
    if (!ready(e.detail)) return
    window.removeEventListener('starsell:consent', wait)
    run()
  })

Google Analytics goes on analytics; Meta, TikTok and other ad pixels on marketing. The cookie itself is starsell_consent (for example 1.10.1764230400: version 1, analytics on, marketing off, then when, in seconds), but read the window value rather than parsing the cookie.

On this page