Cookies

Cookies are small pieces of text that a website saves in a visitor’s browser so it can recognise that browser later. Stores use them to keep items in a cart, remember a login, save a currency choice and measure visits. Some cookies are set by the site itself, others by outside services embedded in the page.

How a cookie works

When a browser loads a page, the server can ask it to store a short name and value, such as a random identifier. On later requests to the same domain, the browser sends that value back. This lets the site connect separate page loads into one visit and link a return visit to an earlier one, without the visitor typing anything.

A cookie also carries rules: which domain may read it, when it expires and whether it travels only over secure connections. A session cookie disappears when the browser closes, while a persistent cookie stays until its expiry date or until the visitor clears it.

Cookies are not programs and cannot read files on a computer. They are labels that the browser stores and returns. Their value comes from what the website links to the label on its own servers, such as a cart, a login or a history of visits.

First-party and third-party cookies

A first-party cookie is set by the domain shown in the address bar. A store uses these for its cart, login and its own analytics. A third-party cookie is set by a different domain whose code runs on the page, such as an advertising network, an embedded video player or a social button.

  • First-party: cart contents, login state, language and currency, site analytics
  • Third-party: cross-site advertising, retargeting, some embedded widgets
  • Both kinds can be session or persistent

Major browsers have been restricting third-party cookies for years, and some block many of them by default. This makes first-party data more important for any store that wants to understand its own customers.

Essential and non-essential uses

It helps to sort cookies by purpose. Essential cookies make the site work: without them, a cart would empty on every page. Preference cookies remember choices such as region. Analytics cookies measure how the site is used. Marketing cookies support advertising and retargeting. Many consent rules treat the first group differently from the others.

Sorting this way also makes audits easier. When a new plugin or marketing tool is installed, the first question is which purpose group its cookies belong to. A tool that sets marketing cookies on every page needs the same consent handling as the rest of that group, even if it was installed only for a short campaign.

Consent depends on where your customers are

Rules on cookies differ by country and region. In some places, a site must ask for clear consent before setting non-essential cookies and must make refusing as easy as accepting. In others, a notice and an opt-out may be enough. Requirements also change over time, so a setup that was acceptable a few years ago may not be today.

This article is general information, not legal advice. A store that sells across borders should ask a qualified legal professional which rules apply to its markets and keep a record of how consent is collected and stored.

Cookies, personalised prices and fairness

Because cookies identify a returning browser, they can be used to change what a visitor sees, including offers and, in some cases, prices. A welcome discount for first-time visitors is a common and open example. Quietly raising a price because a cookie shows repeat interest is a different matter. It can damage trust if shoppers notice, and in some jurisdictions it may raise consumer protection or data protection questions.

A safer approach is to keep the base price the same for everyone in a market and make any targeted offer visible as a discount, with clear terms. That keeps the pricing story simple to explain.

Why consent choices affect your data

When visitors decline analytics cookies, their visits may be missing from reports or only estimated. Suppose, as an example, a garden furniture shop sees 4,000 orders in its store system over a month, while analytics attributes only 3,100. The gap does not mean orders were lost. It means part of the audience was not measured, and the share can differ by country, device and season.

When judging the effect of a price change, compare orders from the store system first, then use analytics to see behaviour patterns such as product views and cart additions.

Consent rates also change when the banner changes. A redesign that makes refusing easier may lower the share of measured visits overnight, which can look like a traffic drop. Note banner changes in your reports, just as you would note a price change, so the two are not confused.

A practical checklist

  1. List every cookie the site sets, including those from plugins and embedded tools.
  2. Group them by purpose: essential, preferences, analytics and marketing.
  3. Configure a consent banner that matches the rules for your main markets.
  4. Load non-essential tags only after the required consent is given.
  5. Review the list after installing new apps or plugins, since they often add cookies.

Finally, test the result from a visitor’s point of view. Open the site in a private window, refuse optional cookies and check that the cart, login and checkout still work. Then accept them and confirm that analytics and advertising tags load only at that point.

Key takeaways

  • Cookies are small text values a site stores in the browser to recognise it later.
  • First-party cookies come from your own domain; third-party cookies come from other domains.
  • Consent requirements vary by jurisdiction, so check the rules for each market with a legal expert.
  • Declined cookies create gaps in analytics, so use store orders as the record of sales.
  • Keep base prices consistent and show targeted offers openly as discounts.

Frequently asked questions

Do I need a cookie banner?

It depends on where your visitors are and which cookies you set. Many regions require consent for non-essential cookies such as advertising and some analytics. Ask a legal professional which rules apply to your markets.

Are first-party cookies always allowed without consent?

Not always. The rules usually depend on purpose, not on who sets the cookie. A first-party analytics or marketing cookie may still need consent in some jurisdictions, while a cart cookie usually counts as essential.

Can cookies change the price a shopper sees?

Technically, yes, since a site can read a cookie and show different content. Doing so for prices carries trust and legal risks. Visible, clearly labelled offers are easier to defend than hidden price differences.

Related terms

In BlackAha, Pricing Reports helps you analyze pricing and competition by category, brand and domain.

Back to the Pricing Dictionary