First-party cookie
A first-party cookie is a cookie set by the site the visitor is on, such as your shop, rather than by another domain.
By Berend Vrakking, founder of Product Metrics. Updated 13 November 2026.
First-party cookie example
| Cookie | Set by | Type |
|---|---|---|
| cart_id | shop.example | First-party |
| language | shop.example | First-party |
| ad_network_id | adnetwork.example | Third-party |
The visitor is on shop.example. The first two cookies come from that same domain, and the third comes from another one. Illustrative data.
Put it into practice
- Explore it: Full Signal TrackingSee how purchases reach Google Ads and Meta from your own domain.
- Read the guide: Google tag gateway vs server-side taggingTwo ways to serve tags and cookies from your own domain.
First-party cookie: one product and the whole account
Because your shop’s own domain stores it, a first-party cookie can carry a value such as a click ID from the landing page all the way to the purchase. A third-party cookie belongs to someone else’s domain, such as an ad network’s.
Being first-party does not make a cookie permanent. Browsers limit cookies, and how hard depends on how the cookie was created. WebKit says Safari’s Intelligent Tracking Prevention deletes all cookies created in JavaScript, and all other script-writeable storage, after 7 days of no user interaction with the website. For cookies set in an HTTP response, it states a 7-day cap only for requests it detects as third-party CNAME cloaking or IP address cloaking.
Full Signal Tracking’s first-party cookie lasts 30 days when it is served from your own origin. Full Signal Tracking sends purchases from a unique endpoint on your own domain and gets through every adblocker, and it reads the visitor’s consent choice before sending anything: first-party does not mean consent-free.
First-party cookie: common mistake
Assuming a first-party cookie is exempt from browser limits. WebKit’s 7-day rule applies to cookies created in JavaScript, whichever domain they belong to.
First-party cookie: questions
What is the difference between a first-party and a third-party cookie?
Can you give an example of a first-party cookie?
What is a third-party cookie?
Keep reading
- GCLIDThe click ID Google Ads adds to the landing page URL.
- Ad blocker testSee what six blockers stop, tested in real browsers.
- Enhanced conversions vs server-side trackingWhat each method recovers when cookies are blocked or expire.
- Enhanced conversionsHashed customer data that helps Google match a purchase without a cookie.
- Consent modeThe consent signals that decide which cookies Google tags may use.
- Transaction IDThe order number that keeps each purchase counted once.
- Magento 2 server-side trackingThe module serves its script and collector on random paths on your own domain.