What are cookies?

A clear explanation and the latest developments

  • Article
  • Technical Web Analytics
  • Data Analytics
Pamela Greveling
Technical Web Analyst
5 min
17 Dec 2021

Cookies. This word comes up a lot in the world of marketing and online analytics. But what exactly are those cookies? And are there different types of cookies?

A cookie is a small piece of data, a small text file, that is stored in the browser and therefore on the device (computer/tablet/smartphone) of the user. Although the word 'cookies' sometimes carries a negative connotation, these cookies are crucial for the proper functioning of a website.

Sometimes cookies can also be used to track users on another website (cross-site tracking). This last form offers many possibilities, but gives cookies (sometimes incorrectly) a bad name.

There are different types of cookies and they can be used for different purposes.

Applications of cookies 

Cookies have many applications, but usually, a distinction is made between three different areas of application:

Functional cookies 

These cookies are mainly used to make the website work properly. You can think of remembering your language preference, so that you do not have to choose a language every time you visit a website. Cookies can also ensure that you remain logged in to a website, so that you do not have to log in again on every page.

Analytical cookies 

These cookies are used to store and analyze user statistics. The purpose of these cookies is often to optimise the website and improve the user experience. This data provides insight into, for example, how many people have visited the website, which pages or articles are often viewed and which links are often clicked on. Cookies used in A/B testing also fall under this category. 

Marketing cookies 

These cookies are sometimes also referred to as tracking cookies and are intended to carry out online marketing activities. With the help of these cookies, you as a user of a certain website can also be recognized on other websites. These websites can then, for example, show advertisements for the product that was previously viewed on your website.

HTTP cookies vs. JavaScript cookies

A technical distinction can be made in how cookies are placed, namely as part of an HTTP response or with Javascript. So that is only a difference in how they are placed, not in their functionality or the use of the cookies. ITP distinguishes between these cookies, which is why we name them here.

HTTP cookies 

We also call these cookies server-set cookies, because they are placed by the server. When a web page is loaded, the browser makes an (HTTP) request to the website's server to load the page being visited. In response, the server then sends the content of that page back to the browser, showing the user the requested web page. A cookie may also be set as part of that response. We call that an HTTP cookie.

These cookies are set directly by the server of the website and therefore also managed by the owner of the website. These cookies are often part of the functionality of the web page.

JavaScript cookies 

Another way to place cookies in the browser is with JavaScript. JavaScript is a programming language that can run on web pages in the browser. It is often used to make websites dynamic using Tag Management Systems like Google Tag Manager. 

By loading tools or scripts from third parties via JavaScript, these scripts can also place cookies on the web page. These cookies are therefore often used for analytical or marketing purposes.

1st party vs. 3rd party cookies

When a user visits a website, that website itself can place a cookie. We call this first party cookies. However, cookies can also be placed on another domain, the so-called third-party cookies.

The latest development regarding cookies: Intelligent Tracking Prevention 

There are therefore different types of cookies, which are used for different purposes. Cookies are necessary for the functioning of websites, but can also be used for other purposes.

In recent years, a lot of legislation has been introduced regarding cookies. The browsers where these cookies are stored also often impose restrictions on the placing and use of cookies, such as Apple with Intelligent Tracking Prevention (ITP).

You can read what these limitations entail in this article about the impact of ITP on analytics and the user experience. 

This is an article by Pamela Greveling, Technical Web Analyst at Digital Power

As a Technical Web Analyst at Digital Power, Pamela focuses on guaranteeing excellent data quality. After all, only if the data is reliable good insights can be obtained. She has helped several clients establish a robust analytics implementation for both their web and (native) app environments.

Pamela Greveling

Technical Web Analystpamela.greveling@digital-power.com

Receive data insights, use cases and behind-the-scenes peeks once a month?

Sign up for our email list and stay 'up to data':