Date

What is a First Party Cookie? Definition and Analytics Examples

A first party cookie is a cookie set by the website domain a visitor is currently using. If a visitor is on example.com and example.com stores a cookie, that is a first party cookie.

First party cookies are commonly used for login sessions, shopping carts, preferences, language settings, security, and sometimes analytics. They are different from third-party cookies, which are set by domains other than the site being visited.

First party cookies can store:

  • Session IDs
  • Login state
  • Shopping cart contents
  • Language preferences
  • Theme preferences
  • Security tokens
  • Analytics identifiers
  • Consent preferences

Some first party cookies are necessary for a website to work. Others support measurement or personalization and may require additional privacy analysis.

First party vs third party cookies

Cookie typeSet byCommon use
First party cookieThe site being visitedSessions, preferences, carts, same-site analytics
Third party cookieAnother domainCross-site advertising, retargeting, third-party measurement

Browsers are much more restrictive with third-party cookies because they enable cross-site tracking. First party cookies are still widely supported, but privacy rules can still apply depending on purpose.

First party cookies in analytics

Some analytics platforms use first party cookies to recognize returning visitors and connect sessions. This can improve reporting continuity, but it still stores an identifier in the browser.

Swetrix takes a different approach: cookieless analytics. You can measure traffic, sources, pages, events, conversions, and performance without storing analytics cookies on visitors' devices.

Related terms: cookie, third party cookie, cookie consent banner, and personal data.

The web analytics your site deserves.

Tired of bloated dashboards, privacy concerns, and data you can't trust? Switch to Swetrix and get simple, powerful analytics that respects your users.

Cancel anytime
5 minute setup
GDPR compliant