# CookieConsent: what changed from 2 to 3 - Product: CookieConsent (https://whatsnew.fyi/product/cookieconsent) - Vendor: Orest Bida - Range: changelog entries numbered after v2.9.2 up to and including v3.1.0, stable releases only - Entries below: 3 releases (newest first) - Resolved: 2 is v2.9.2 and 3 is v3.1.0, the newest stable release of each major we track - Carrying security changes: 0 · CVEs mentioned: 0 · Mentioning breaking changes: 0 · Removing or deprecating something: 1 - Page: https://whatsnew.fyi/product/cookieconsent/compare/2...3 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. ## What changed (13 changes, grouped by kind) ### Added #### v3.1.0 (2025-02-04) - Store language code of the consent in the cookie #### v3.0.0 (2024-01-20) - Add granular control over scripts through services - Add support for external .json files for language and translation configuration - Add ESM format for easier integration with various frameworks - Add new customization options for button and modal layouts - Add multiple ways to handle scripts using script-tags, callbacks, or events ### Changed #### v3.0.0 (2024-01-20) - Redesign configuration parameters to be more intuitive and clearer - Improve language and translation handling ### Fixed #### v3.1.0 (2025-02-04) - Fix service reject issue and setCookieData() method deleting lastConsentTimestamp field - Fix eraseCookies domain bug #### v3.0.1 (2024-04-02) - Unhandled exception when category is unknown - Default enabled categories reset on preferences modal close ### Removed #### v3.0.0 (2024-01-20) - Remove compatibility with v2 configuration, API, and custom attributes ## Release notes ### v3.1.0 — cookieconsent v3.1.0 - Date: 2025-02-04 - Version: v3.1.0 - Original notes: https://github.com/orestbida/cookieconsent/releases/tag/v3.1.0 - Permalink: https://whatsnew.fyi/product/cookieconsent/releases/v3.1.0 - **added** — Store language code of the consent in the cookie - **fixed** — Fix service reject issue and setCookieData() method deleting lastConsentTimestamp field - **fixed** — Fix eraseCookies domain bug ##### Features * feat: store language code of the consent in the cookie by @OndraM in https://github.com/orestbida/cookieconsent/pull/761 ##### Bug fixes * fix: service reject issue & setCookieData() method deletes lastConsentTimestamp field by @peaemaye in https://github.com/orestbida/cookieconsent/pull/701 * fix: eraseCookies domain bug and expand tests by @imnasnainaec in https://github.com/orestbida/cookieconsent/pull/719 ##### Documentation * docs update setCookieData examples with correct function by @alanbiju79 in https://github.com/orestbida/cookieconsent/pull/686 * docs: add missing bar 'top' position option by @OndraM in https://github.com/orestbida/cookieconsent/pull/758 * docs: Add example for Google Tag Manager's consent mode by @silenzium in https://github.com/orestbida/cookieconsent/pull/751 * docs: update docs to match code and fix a few typos by @imnasnainaec in https://github.com/orestbida/cookieconsent/pull/716 ##### New Contributors * @alanbiju79 made their first contribution in https://github.com/orestbida/cookieconsent/pull/686 * @peaemaye made their first contribution in https://github.com/orestbida/cookieconsent/pull/701 * @silenzium made their first contribution in https://github.com/orestbida/cookieconsent/pull/751 * @imnasnainaec made their first contribution in https://github.com/orestbida/cookieconsent/pull/716 **Full Changelog**: https://github.com/orestbida/cookieconsent/compare/v3.0.1...v3.1.0 ### v3.0.1 — cookieconsent v3.0.1 - Date: 2024-04-02 - Version: v3.0.1 - Original notes: https://github.com/orestbida/cookieconsent/releases/tag/v3.0.1 - Permalink: https://whatsnew.fyi/product/cookieconsent/releases/v3.0.1 - **fixed** — Unhandled exception when category is unknown - **fixed** — Default enabled categories reset on preferences modal close ##### Bug fixes * fix: unhandled exception when category is unknown by @Idrinth in https://github.com/orestbida/cookieconsent/pull/663 * fix: default enabled categories reset on preferences modal close by @orestbida in b91b9c44f1ba63cf6f87bfa65e574c17a54c7732 ##### Documentation * docs: fix broken GitHub links by @lneugebauer in https://github.com/orestbida/cookieconsent/pull/625 ##### New Contributors * @lneugebauer made their first contribution in https://github.com/orestbida/cookieconsent/pull/625 * @Idrinth made their first contribution in https://github.com/orestbida/cookieconsent/pull/663 **Full Changelog**: https://github.com/orestbida/cookieconsent/compare/v3.0.0...v3.0.1 ### v3.0.0 — cookieconsent v3.0.0 - Date: 2024-01-20 - Version: v3.0.0 - Original notes: https://github.com/orestbida/cookieconsent/releases/tag/v3.0.0 - Permalink: https://whatsnew.fyi/product/cookieconsent/releases/v3.0.0 - **added** — Add granular control over scripts through services - **added** — Add support for external .json files for language and translation configuration - **added** — Add ESM format for easier integration with various frameworks - **added** — Add new customization options for button and modal layouts - **added** — Add multiple ways to handle scripts using script-tags, callbacks, or events - **changed** — Redesign configuration parameters to be more intuitive and clearer - **changed** — Improve language and translation handling - **removed** — Remove compatibility with v2 configuration, API, and custom attributes First stable v3 release! 🎉 ##### Demo You can check out v3 on the [playground](https://playground.cookieconsent.orestbida.com/). ##### Main features - more granular control over scripts, thanks to [services](https://cookieconsent.orestbida.com/advanced/manage-scripts.html#services) - better [language/translation](https://cookieconsent.orestbida.com/advanced/language-configuration.html) handling (allow the use of external `.json` files) - more intuitive and clearer [configuration parameters](https://cookieconsent.orestbida.com/reference/configuration-reference.html) - easier integration with various frameworks thanks to the ESM format (check out some demos on [Stackblitz](https://stackblitz.com/@orestbida/collections/cookieconsent-v3)) - many new customization options (button/modal layouts) - multiple ways to handle your scripts, using either [script-tags, callbacks or events](https://cookieconsent.orestbida.com/advanced/manage-scripts.html#how-to-manage-scripts) - and much more ... ##### Upgrade guide from v2 to v3? ❌ There are way too many changes compared to v2; the configuration, api, custom attributes ... everything is different, although the end result is essentially the same. *I personally find it faster to just start from scratch rather than trying to adapt the previous configuration*. ##### Should you upgrade? YES. Although v2 will still receive some maintenance updates, it will eventually be sunset. ##### Last but not least A huge thanks to everyone who contributed!