What is the _ym_d cookie?
_ym_d is an HTTP cookie associated with the Yandex Metrica tracking script, a web analytics tool developed by the Russian company Yandex, functionally comparable to Google Analytics. It is set automatically by the Yandex Metrica code on any website that embeds this script.
The cookie appears as soon as a page loads and the Yandex Metrica script runs in the visitor's browser, regardless of whether the site's audience is based in Russia/CIS or elsewhere, as long as the site owner has installed the tracking code.
What data it stores
According to Yandex's public documentation, _ym_d stores the date (timestamp) when the user was first seen by the Yandex Metrica script on that domain. The value is typically a number representing a point in time (Unix timestamp), with no directly readable personal data in the cookie itself.
This information is sent to Yandex Metrica's servers and used alongside other cookies from the same family (e.g. _ym_uid, _ym_isad) to build the visitor's behavioral profile in analytics reports.
What it is used for
The main purpose is to let Yandex Metrica distinguish new visitors from returning ones, based on the recorded date of first interaction. This data feeds reports such as retention, visit frequency, and long-term user behavior.
For site owners, this information helps in understanding traffic patterns, optimizing content, and, in some cases, measuring the effectiveness of marketing campaigns.
Does it require consent?
_ym_d is classified as a statistics (analytics) cookie, not strictly necessary for the website to function. Under the GDPR and the ePrivacy Directive (in Romania, transposed via Law 506/2004), this type of cookie requires the visitor's explicit, prior consent before being placed in the browser.
- The site owner must declare the cookie in the cookie policy, including provider, purpose, and duration.
- The Yandex Metrica script must not load before the visitor consents to the statistics category.
- A clear opt-out option must be offered, as easy to use as the opt-in.
How to block or delete _ym_d
A visitor can manually delete or block _ym_d from browser settings (Chrome, Firefox, Edge, Safari – per-site cookie management) or use tracker-blocking extensions. Deleting the cookie does not affect the site's functionality, only Yandex's statistics.
For site owners, the correct approach is to technically block the Yandex Metrica script until consent is obtained, not just disclose it. A CMP such as CookieFix can automatically block the Yandex Metrica script — and by extension the setting of _ym_d — until the user accepts the statistics category.
Frequently asked questions
It's an HTTP cookie set by Yandex Metrica to record the date of a user's first visit, helping distinguish new visitors from returning ones.
Yes, it's a statistics/analytics cookie used to build a long-term behavioral profile of visitors.
Yes, as a statistics cookie it must only be set after the visitor has given explicit consent, per GDPR and ePrivacy rules.
Its typical duration is 1 year from when it's set, after which it expires automatically from the browser.