We probably wouldn’t have written this material if we didn’t work with analytics. Cookies are typically the domain of developers, but they also have a direct impact on analytics and website promotion. In this article, we’ll dive into some theoretical knowledge about cookies that can be useful for website promotion and analytics.
What are cookies?
Cookies are temporary files containing a specific set of data that are sent from a website to the user’s browser.
The invention of cookies is credited to Lou Montulli, who developed them in 1994 when faced with the problem of keeping items in a shopping cart between user visits. Later, this technology was patented and adopted by many browsers.
Appointment of cookies
- storing temporary information about the user (such as items in a shopping cart, user preferences, authentication, and other technical metrics);
- used in subsequent sessions for convenience and to read technical information.
Therefore, cookies are useful in the following scenarios:
- analytics can instantly determine whether a user has visited the site before (new or returning visitor);
- retrieving session metrics and dates for user visits;
- consolidating other metrics based on the user’s browsing history.
Types of cookies
- session cookies;
- persistent cookies;
- third-party cookies;
- super cookies;
- zombie cookies.
The two most common types are session and persistent cookies.
👉 Session cookies - these cookies are stored only during the user’s session and are deleted once the browser window is closed.
👉 Persistent cookies - these cookies are stored in the user’s browser for a specific period and are updated on subsequent visits to the site. These are often referred to as "tracking cookies" and are widely used by advertisers for remarketing, preference analysis, and analytics. In fact, our friends at Facebook, Google, and others primarily rely on them.
What data can you get from cookies?
Each cookie record has parameters, as shown in the following screenshot:
Cookie parameters
- name - the name of the cookie file;
- value - a unique cookie value for identifying the user;
- expires - the expiration date of the cookie;
- max-age - the lifespan of the cookie from the time it’s set;
- path - the directory on the server where the cookie is available;
- domain - the domain to which the cookie belongs;
- secure - an indicator of secure data transmission.
These are the basic parameters transmitted upon the first visit and updated after subsequent visits to the website.
Cookies used by major analytics and advertising platforms
It’s no secret that all advertising systems use user cookies for ads and web analytics, and they store their own data in these cookies if their codes are present on the website.
Cookies used by Google Ads & Analytics:
- _ga - a unique user identifier used by Google Analytics, stored for two years;
- _gid - a special user identification parameter valid for 24 hours;
- _gac - used to link Google Analytics and Google Ads.
Cookies used by Facebook:
- _fbp - indicates the presence of a Facebook Pixel on the website;
- _fbc - indicates a user’s transition from a Facebook ad with a fbclid tag, storing the tag data;
- c_user - a unique user identifier.
Each entry contains a unique ID used by the respective system for its own purposes.
iOS 14+, cookies, and advertising
You’ve probably heard about changes brought by the iOS operating system update. Users—and now operating systems like iOS—have grown weary of ads. Apple has introduced stricter cookie transmission restrictions, giving users the choice to allow or block cookies. As a result, Facebook advertisers faced significant challenges. We discussed this in more detail in one of our previous articles.
Google quickly adapted, resolving the issue through conversion tracking with Tag Manager. Facebook, on the other hand, struggled but eventually found a similar solution by transmitting data directly from the server via Conversion API.
Conclusion
Cookies were invented for a reason, and advertising systems will continue to evolve to ensure they can gather data even without cookies if needed.