By Daniel Rowles, lead trainer at Target Internet and author of Digital Branding (Kogan Page). Last updated: November 2026.
Cookies in digital marketing are small text files that websites store in a visitor's browser so they can remember that visitor. Marketers use them to measure traffic in tools such as Google Analytics, track conversions from ads, retarget visitors and personalise content. First-party cookies are set by the site you visit; third-party cookies are set by other companies, usually ad networks.
This guide explains the main types of cookie, how marketers use them, what actually happened to third-party cookies after years of headlines about their end, and which cookies need consent in the UK following the 2026 changes to the law. It is written for marketers rather than developers.
A cookie is a small piece of data a website saves in your browser, holding an identifier and sometimes settings, which the browser sends back on later visits. That simple mechanism lets a site recognise a returning visitor, keep someone logged in, remember what is in a basket, and connect a visit today with an ad click last week.
Marketers usually describe cookies in two ways: by who sets them, and by what they are for.
| Type of cookie | Set by | Typical marketing use |
|---|---|---|
| First-party | The website you are visiting | Analytics, logins, baskets, preferences |
| Third-party | Another company, usually an ad or social platform | Cross-site tracking, retargeting, audience building |
| Session | Either | Deleted when the browser closes; keeps a single visit together |
| Persistent | Either | Stays for a set period; recognises returning visitors |
The distinction that matters most for marketing is first-party versus third-party, because browsers and regulators treat them very differently. Our marketer's guide to first-party cookies goes deeper on the first type.

Cookies support four everyday marketing jobs: measurement, conversion tracking, retargeting and personalisation. Most marketers rely on all four, often without seeing the cookies involved.
Measurement. Google Analytics 4 uses first-party cookies to recognise returning visitors. According to Google's cookie documentation, the GA4 tag sets a _ga cookie to distinguish users and a _ga_<container-id> cookie to persist session state, both expiring after two years by default.
Conversion tracking. When someone clicks an ad and later buys or fills in a form, cookies connect the two events so you can see cost per conversion and return on ad spend. Without that link, you are judging campaigns on clicks rather than results.
Retargeting. Ad platforms use cookies and pixels to recognise people who visited your site and show them ads elsewhere. This is where third-party cookies have traditionally done the heavy lifting, and our guide to retargeting techniques that work covers how to use it without annoying people.
Personalisation. Cookies remember language, location, recently viewed products and logged-in status, so a returning visitor sees a more relevant page.
Cookies rarely work alone. A tracking pixel, such as the Meta Pixel or the LinkedIn Insight Tag, is a small piece of code on your site that sends visit and conversion data to an ad platform, and it usually sets or reads cookies as it does so. Conversion APIs send the same events directly from your server to the platform, which makes them less dependent on what the browser allows.
Some vendors offer IP targeting or device fingerprinting as alternatives to cookies. IP targeting is less precise because many people share an address on office, mobile and public networks, and both methods fall under the same UK rules as cookies, so they are not a way around consent.
Copy and paste prompt: "Here is the list of cookies and tags our website sets, taken from our cookie scanner or browser developer tools: [paste list]. For each one, tell me who sets it (first-party or third-party), what it is most likely used for (analytics, advertising, functionality or strictly necessary), and flag any I should check with our developer or data protection lead."
Third-party cookies have not disappeared, despite years of predictions. Safari and Firefox block them by default, but Google reversed its plan to remove them from Chrome, so they still work for most Chrome users.
Apple moved first. Safari introduced Intelligent Tracking Prevention in 2017 and, as InfoQ reported, Safari 13.1 began blocking all third-party cookies by default in 2020. Mozilla's Firefox support pages confirm that cross-site tracking cookies are now disabled by default for all Firefox users.
Google took a different route. It tested restricting third-party cookies for 1% of Chrome users in January 2024, then in July 2024 said it would not remove them on a fixed timetable, and in April 2025 dropped a planned prompt asking users to choose. On 17 October 2025, Google confirmed in its Privacy Sandbox update that it would retire most of the technologies built to replace third-party cookies, including Topics, Protected Audience and Attribution Reporting, citing low adoption.
A few narrower technologies survive. CHIPS, for example, lets embedded services such as chat widgets, video players and login tools keep a separate cookie for each site they appear on, so they keep working without being able to follow people across the web. These matter to developers, but none of them replaces third-party cookies for targeting or measurement.

For marketers, the practical result is a split web. A large share of visitors, particularly on iPhones and Macs, already browse without third-party cookies, so retargeting audiences and cross-site measurement are incomplete whatever Chrome does. Planning around first-party data is still the safer strategy.
If you want to strengthen the measurement side, the Target Internet platform includes interactive courses such as Introduction to GA4, skills benchmarking, accredited certification, over 400 episodes of the Digital Marketing Podcast, and monthly live masterclasses delivered by working practitioners.
In the UK, you no longer need consent for every non-essential cookie, but you still need it for advertising and tracking cookies. The Data (Use and Access) Act 2025 amended the cookie rules in the Privacy and Electronic Communications Regulations, and according to law firm Stevens and Bolton, the changes took effect on 5 February 2026.
The new exemptions cover cookies used solely to produce statistics about how your own site is used, cookies that remember appearance or preferences, and strictly necessary cookies such as those for security and fraud prevention. People must still be told what these cookies do and given a simple way to opt out. The analytics exemption is narrow: it does not cover analytics providers that use the data for their own purposes or combine it with other data.

Two cautions apply. First, these changes are UK only: sites with EU visitors must still meet the EU's GDPR and ePrivacy rules, which have not changed. Second, other tracking methods are covered too.
The ICO's guidance on storage and access technologies applies to pixels, fingerprinting and similar technologies, not just cookies, and matching website visitors' IP addresses to email addresses for marketing needs consent. Check your own setup with your data protection lead, because this section is general information rather than legal advice.
Where consent is still needed, the banner is where you earn it. The ICO has reviewed cookie banners on the UK's most visited websites and expects rejecting non-essential cookies to be as easy as accepting them, so a prominent accept button next to a buried settings link is a risk.
A good banner explains in plain English what each category does, offers accept and reject options with equal prominence, does not set advertising cookies until someone agrees, and makes it easy to change your mind later. Clear choices also tend to produce more honest data, because the people who opt in are the ones genuinely interested in what you offer.
Google Consent Mode helps you respect these choices while keeping some measurement, and our guide to Google Consent Mode explains how to set it up.
The best approach is to depend less on any one tracking method. First, build first-party data through email sign-ups, accounts, preference centres and useful gated content, so you have a direct relationship with your audience that no browser change can remove.
Second, tidy up the basics. Audit the cookies and tags on your site at least once a year, remove anything nobody uses, and make sure your banner and cookie policy match what the site actually does. Use Consent Mode and platform conversion APIs where you advertise, and judge campaigns on trends and modelled results rather than expecting every conversion to be tracked.
Third, report honestly on what you can and cannot measure. Expect gaps between platforms, because Safari users, people who decline cookies and people who switch devices will not all be joined up. Agree with stakeholders which numbers you will use to make decisions, and look for consistent trends across your analytics, ad platforms and sales data rather than chasing a single perfect figure.
We talked through these choices in our podcast episode on life after third-party cookies, which is a useful companion to this guide.
If you are ready to take a structured approach to building your digital marketing skills, explore Target Internet membership options and discover how the platform's interactive courses, benchmarking tools, podcast, accredited certification and live masterclasses can accelerate where you are heading next.
Marketing cookies, also called advertising or targeting cookies, are cookies used to recognise visitors across visits or sites so they can be shown relevant ads, retargeted after leaving a website, or added to advertising audiences. They are usually set by ad and social platforms. In the UK and EU they need the visitor's consent before they are set.
Not in Chrome. Google abandoned its plan to remove third-party cookies and in October 2025 retired most of the Privacy Sandbox tools designed to replace them. Safari and Firefox already block third-party cookies by default, though, so a large share of visitors browse without them, and marketers should still plan around first-party data.
A first-party cookie is set by the website you are visiting and can only be read by that site. It powers logins, baskets, preferences and analytics. A third-party cookie is set by another company, usually an ad network, and can be read on every site that uses that network, which is what makes cross-site tracking and retargeting possible.
In the UK, since February 2026, you may not need consent if your analytics cookies are used solely to produce statistics about your own site and the data is not used for advertising or by the provider for its own purposes. You must still explain them and offer an opt-out. In the EU, consent is still normally required. Check your configuration with your data protection lead.
By default, the Google Analytics 4 tag sets two first-party cookies, _ga and _ga_<container-id>, and both expire after two years. The expiry is refreshed on new visits, and you can change the default in your data stream's tag settings. Safari and some privacy tools may shorten how long these cookies survive in practice.
Daniel Rowles is lead trainer at Target Internet and the author of Digital Branding (Kogan Page). He co-hosts The Digital Marketing Podcast and delivers digital marketing and AI training for organisations around the world, including analytics, measurement and data privacy for marketers. You can find out more on his Target Internet profile.
1. Google (2026). Google Analytics cookie usage on websites. https://support.google.com/analytics/answer/11397207
2. Google Privacy Sandbox (2025). Update on plans for Privacy Sandbox technologies. https://privacysandbox.google.com/blog/update-on-plans-for-privacy-sandbox-technologies
3. InfoQ (2020). Safari blocks third-party cookies by default. https://www.infoq.com/news/2020/04/safari-third-party-cookies-block/
4. Mozilla (2026). Third-party cookies and Firefox tracking protection. https://support.mozilla.org/en-US/kb/disable-third-party-cookies
5. Stevens and Bolton (2026). The Data (Use and Access) Act 2025: cookies, what is changing and what you need to know. https://www.stevens-bolton.com/insights/102mqbh/the-duaa-cookies-what-is-changing-and-what-you-need-to-know/
6. Information Commissioner's Office (2026). Guidance on the use of storage and access technologies. https://ico.org.uk/for-organisations/direct-marketing-and-privacy-and-electronic-communications/guidance-on-the-use-of-storage-and-access-technologies/
In this episode we explore one of the biggest shifts in digital marketing: the move from traditional keyword searches towards AI-powered conversations, recommendations and personalised discovery.