Tracking

Cookies and Tracking: How It Works in Simple Terms

Leon Bauer Leon Bauer · · · 5 min read
Cookies and Tracking: How It Works in Simple Terms

The super-short version

Websites remember things about you using small notes called cookies and a few other tools. Those notes help the site work (like keeping items in your cart), measure what’s popular, and—sometimes—show more relevant ads. You can control much of this in the site’s banner and your browser settings.

What is a cookie?

Think of a cookie as a tiny sticky note a website asks your browser to keep.
Next time you visit, the site says, “Show me the note,” and your browser hands it over. The note might say:

  • “This person is logged in.”
  • “Dark theme on.”
  • “Cart has 2 items.”

Key point: a cookie is a random ID plus simple info. It doesn’t contain your photos, documents, or bank details unless you typed those into the site.

Browser-to-website sketch showing a cookie as a sticky note with simple preferences and cart count

First-party vs. third-party

  • First-party: Notes set by the site you’re on (e.g., yourshop.com). These usually support features and basic analytics.
  • Third-party: Notes from a different company that’s present on the page (e.g., an ad network or embedded tool). These are often used for cross-site ad measurement and are being limited by modern browsers.
Comparison chart explaining first-party cookies for site features versus third-party cookies for cross-site tracking

Cookies aren’t the only way sites remember

Websites can also use a few other “memory drawers”:

  • Local storage: Like a bigger sticky note box inside your browser for the same site. Useful for preferences (e.g., language).
  • Pixels (a.k.a. tags): A tiny invisible image or script that pings a server—“Someone viewed the pricing page.” It’s like a door sensor counting entries.
  • Device or app IDs (in mobile apps): A phone-friendly ID that helps measure installs or campaign results inside apps (see Apple’s App Tracking Transparency and Android’s Advertising ID controls).
  • Fingerprinting (more advanced): Combining technical details (browser type, screen size, fonts) to guess it’s you—without a cookie. Modern policies increasingly try to limit this (see European Data Protection Supervisor on tracking).

You don’t need to memorize these. Just know that cookies are common, and a few other tools exist to do similar jobs.

What actually happens when a page loads

  1. You click a link. Your browser requests the page.
  2. The site responds with content and may ask your browser to store or read cookies or local storage.
  3. Optional tags/pixels fire: These simply say, “A view happened” or “A button was clicked,” sometimes with a basic ID so repeat visits can be counted.
  4. Reports are built: Site owners see totals like “10,000 visits, 2,000 added to cart,” not a spy movie dossier about you.
Step-by-step sequence showing page request, cookies/local storage, optional pixels, and aggregated reporting

Why do companies track at all?

  • Make the site work: Stay logged in, keep your cart, remember preferences.
  • Measure what’s popular: Which pages people read, where they get stuck, which features are used.
  • Improve the experience: Show content you prefer (e.g., pricing in your currency).
  • Keep things safe: Detect fraud or bots.
  • Advertising: Limit how many times you see the same ad, and measure whether ads led to visits or purchases.

Not all tracking is advertising. Many basics are there so the site functions and gets better over time.

What’s usually collected (and what isn’t)

Common: page views, clicks, time spent, rough location (city/country), device type (phone vs. laptop), and an anonymous ID.
Not automatic: your name, exact address, or card number—unless you type them in. Reputable sites avoid putting sensitive info into cookies or URLs.

Cookies can’t: read files on your computer, install software, or “see” other websites you’ve opened.

Why you’re seeing more consent banners

Privacy laws (and browser changes) give you more control. That’s why sites ask:

  • “Accept all” vs. “Reject” vs. “Customize” for analytics and ads.
  • Some features may only work fully if you allow certain categories.

Tip: If you only want the site to function, choose essential or strictly necessary only. If you’re fine helping the site improve, you can allow analytics. You can change your mind later via a “Privacy” or “Cookie settings” link in the footer.

Your controls (quick and practical)

  • Cookie banner: The easiest place to choose what’s allowed on that site.
  • Browser settings:
    • Block third-party cookies.
    • Clear cookies for a site (logins and carts will reset).
    • Use “Tracking Protection” or “Enhanced Privacy” modes.
  • Private/Incognito windows: Don’t save most cookies after you close the window (but they still work during the session).
  • Ad preferences: Adjust personalized ad settings with major platforms (Google, Apple, etc.).
  • Extensions: Content blockers can reduce third-party tracking, though they may break some site features.
Dashboard-style graphic showing cookie banner choices, browser settings, incognito mode, and ad preference controls

Web vs. mobile apps

On the web, cookies and pixels are common. In apps, tracking leans on app-level IDs and the phone’s own privacy settings. Both Apple and Google let you limit ad tracking or require apps to ask permission to track.

Simple myths—cleared up

  • “Cookies are viruses.” No. They’re text notes, not software.
  • “All tracking is creepy.” Some is strictly for basics—login, carts, site reliability.
  • “I can’t control any of this.” You can—via banners, browser settings, and device privacy options.

Quick glossary (plain English)

  • Cookie: A tiny note your browser keeps for a site.
  • Pixel/Tag: A small call that says “this event happened.”
  • First-party: Set by the site you’re visiting.
  • Third-party: Set by another company on the page (often ads).
  • Consent: Your choice about what non-essential tracking is allowed.
  • Fingerprinting: Trying to recognize a browser by its unique setup.
Split card showing cookies myths vs facts and a quick glossary of common tracking terms

Bottom line

Cookies and tracking are the web’s memory. Used well, they keep sites usable and help teams improve what you see. Used poorly, they feel intrusive. The good news: you have more control than ever. Use the banner to choose, check your browser’s privacy settings, and decide what balance between convenience and privacy fits you.

Leon Bauer

Leon Bauer

Analytics expert & founder

Explorer of web analytics and digital measurement tools. I dive deep into features, limitations, and use cases of platforms like Google Analytics, Matomo, Plausible, and others. My mission is to demystify analytics through honest reviews and practical guides.

More about me →