What cookies does a typical analytics tool set, and why?

A cookie-based analytics tool usually sets a first-party cookie with a random client ID, so it can recognize the same browser on later visits and days. Some also store session or campaign details. Returning-visitor counts and multi-day attribution depend on that memory. To see what your tool sets, open your site's cookies and storage in the browser's developer tools.

Last updated 26 November 2026. By Paul Badarau.

Omar opens his fictional portfolio site in a fresh browser profile, accepts nothing, and looks at the storage panel in the developer tools. He finds two cookies he did not write. One holds a long random string and expires long after the visit. The other holds a timestamp and expires within the hour. Both appeared when the analytics script loaded.

That is the usual pattern. The long-lived cookie is a client ID. On each later visit the script reads it back and sends it, so the tool can say this browser was here last week and came from a search. The short-lived one tracks the current session, so the tool can group pageviews into one visit. Some tools also store the campaign or referrer that first brought the browser, so a sale weeks later can be credited to it.

To list what your own site sets:

  1. Open the site in a private window or a new browser profile, so you start with nothing stored.
  2. Load one page, then open the developer tools and look at cookies, local storage and session storage for your domain.
  3. For each entry, note its name, its expiry and its value. A random string that lasts months is an identifier.
  4. Block one script at a time, clear storage, and reload. The entry that disappears belongs to the script you blocked.

Check storage as well as cookies. A script can keep the same kind of identifier in local storage, and consent rules are about storing or reading data on the device, whatever the mechanism. Cookies from embeds and widgets count too, even when you never wrote a line of tracking code.

The PostDeploy Analytics script sets no cookies and keeps only in-page memory, so step 2 shows nothing from it. It counts visitors per Project and local day with a salted hash instead, and the salt changes every day. The PostDeploy dashboard does use cookies for signed-in Members, on PostDeploy's own hosts. Your visitors never sign in there, so those cookies are never set for them.

The product page for this is Analytics.

Start your 14-day free trial