*** GTM Kit ***

2026-05-06 - version 2.10.0
* Add: New "CMP script attributes" section on the Consent settings page lets you toggle Cookiebot, Iubenda, and CookieYes script-blocking attributes with one click and add a custom attribute for any other CMP — no PHP filters required.
* Add: Fresh installs auto-detect a known CMP plugin (Cookiebot, Iubenda, CookieYes) and pre-select the matching toggle so the right attribute is on from day one.
* Changed: The Cookiebot script attribute (`data-cookieconsent="ignore"`) is now configurable via Settings → Consent → CMP script attributes. Existing installs keep the attribute on by default to preserve current behavior; turn it off explicitly if you do not use Cookiebot.
* Add: New "Script gating" mode on the Consent settings page lets you choose between always loading GTM, letting it load under Consent Mode v2 control, or holding it back entirely until consent is granted. Default stays as "Always load" so existing installs see no change.
* Add: Strong-block mode masks the Google Tag Manager container until visitors consent. Works alongside any CMP and falls back gracefully when no consent signal arrives.
* Add: Power users can override which consent categories must be granted before the strong-block mode unmasks GTM via the new `gtmkit_strong_block_required_categories` filter.
* Dev: `window.gtmkit.consent.state` exposes the current consent state so partner scripts and integrators can inspect it without subscribing to events.
* Add: New developer hooks let CMP integrations and consent add-ons plug into GTM Kit's consent flow without forking the plugin — sites running Cookiebot, CookieYes, WP Consent API or in-house consent solutions can now feed their state straight into GTM Kit.
* Add: Server-side broadcast `gtmkit_consent_updated` so other plugins can react to consent state changes without polling.
* Add: Per-event `gtmkit_event_should_defer` filter so future deferral features can hold individual events back when consent is missing.
* Fix: Eliminate "dependencies that are not registered: gtmkit-container" warnings logged by WordPress 6.9.1+ on sites that have GTM Kit's container active.

2026-04-29 - version 2.9.0
* Add: Scope Google Consent Mode defaults to specific countries or regions (e.g. DK, DE, US-CA) instead of applying them everywhere. Useful for sites with visitors both inside and outside the EU.
* Add: Consent updates from other plugins or partner scripts can now talk to GTM Kit through a simple JavaScript API, making CMP integrations easier.
* Changed: "Wait For Update" is now a proper number field with a sensible 500 ms default on new installs. Your existing value is kept.
* Changed: Clearer warning on the Consent Mode page — if Cookiebot, Complianz, CookieYes, or Cookie Information already handles your consent, leave this setting off.
* Fix: Webhooks for Server-side Tracking on the WooCommerce integrations page no longer stay locked after entering an sGTM Container Domain on premium installs.
* Dev: Introduced an internal automated test suite (PHPUnit + Vitest) and continuous integration across PHP 7.4–8.4 × WordPress 6.9. No functional change — every future release is now verified by unit and integration tests before shipping, raising the bar on quality and reliability.

2026-04-23 - version 2.8.4
* Dev: Declared compatibility with WooCommerce Product Object Caching (`product_instance_caching`) introduced in WooCommerce 10.5. No functional change; resolves the "incompatible plugins" notice in WooCommerce → Settings → Advanced → Features.
* Dev: Tested up to WooCommerce 10.7.
* Dev: Tested up to WordPress 7.0.

2026-03-18 - version 2.8.3
* Fix: Add error handling to WooCommerce blocks action handlers to prevent tracking errors from breaking checkout functionality or interfering with third-party plugins.
* Dev: Tested up to WooCommerce 10.6.

2026-02-17 - version 2.8.2
* Fix: Fix undefined array key warning for order-received query var in edge cases like certain payment gateway redirects or bot traffic.

2026-01-30 - version 2.8.1
* fix: Fixes correct detection of the premium plugin.

2026-01-29 - version 2.8.0
* Add: Improved internal handling of plugin settings to make GTM Kit more reliable and easier to maintain, while ensuring full backward compatibility with existing configurations.
* Changed: Require WooCommerce 9.5.
* Dev: Tested up to WooCommerce 10.5.

2026-01-06 - version 2.7.0
* Add: We have added a new template assistant to help you create your own custom templates for Google Tag Manager.
* Add: Add option to define a custom page that should be detected as the order-received page.
* Add: The debug info now includes a check to determine if WooCommerce purchase events have been recorded in the logs. This information is included in the debug data to assist with troubleshooting and support.
* Fix: Fix edge case where quantity in the Datalayer was 0. Set a default quantity of 1 when the quantity element is missing.
* Changed: Require WooCommerce 9.4.
* Changed: Require WordPress 6.7.
* Dev: Tested up to WooCommerce 10.4.
* Dev: Tested up to WordPress 6.9.

2025-09-24 - version 2.6.0
* Add: Add tracking on the product collection block.
* Changed: Require WooCommerce 9.2.
* Dev: Tested up to WooCommerce 10.2.

2025-08-22 - version 2.5.1
* Fix: Force rounding values to 2 decimal places to fix rounding issues in edge cases.
* Fix: In some cases the GTM container would not load after activating and deactivating settings in 'Server-side Tagging (sGTM)'.
* Dev: Tested up to WooCommerce 10.1.

2025-08-05 - version 2.5.0
* Fix: The add_to_cart event did not fire in the all-products block.
* Changed: Require WooCommerce 9.0.
* Dev: Tested up to WooCommerce 10.0.

2025-04-30 - version 2.4.4
* Add: Introduced the gtmkit_options_set action and the gtmkit_process_options filter.
* Fix: The $hook type hint in enqueue_page_assets was removed to avoid conflicts with plugins passing non-standard data types.
* Dev: Fixed deprecation in Easy Digital Downloads.

2025-04-15 - version 2.4.3
* Fix: Fix conflict with GTM Kit Woo in admin settings.

2025-04-09 - version 2.4.2
* Fix: Fix fatal error in admin when used together with MC4WP: Mailchimp for WordPress.
* Dev: Tested up to WordPress 6.8.
* Dev: Tested up to WooCommerce 9.8.

2025-04-02 - version 2.4.1
* Fix: Permission were not checked correct on the admin API.

2025-04-03 - version 2.4.0
* remove: The Event Inspector has been removed and is only available the premium version.

2025-04-02 - version 2.3.2
* Fix: Permission were not checked correct on the admin API.

2025-03-12 - version 2.3.1
* Fix: Fix a rare case of divisionByZero in calculation of discount.
* Dev: Tested up to WooCommerce 9.7.

2025-01-28 - version 2.3.0
* Fix: Fix an edge case fatal error in admin if $hook for some reason is missing,
* Changed: Require WordPress 6.4.
* Changed: Require WooCommerce 8.4.
* Dev: Tested up to WooCommerce 9.6.

2024-12-03 - version 2.2.2
* Dev: Tested up to WooCommerce 9.4.
* Dev: Tested up to PHP 8.4.

2024-10-29 - version 2.2.1
* Fix: If the cart and checkout endpoints were set to the same page in order to skip the cart the 'checkout' and 'purchase' events would not fire.
* Dev: Tested up to WordPress 6.7.

2024-10-16 - version 2.2.0
* Add: Added notifications and warnings for missing GTM container, debug log usage, auto-update and event inspector usage. These improvements aim to ensure smooth production operations.

2024-10-01 - version 2.1.0
* Add: Added support for the Bricks theme builder.
* Fix: In some cases other plugins or a theme could block GTM Kit from firing JS event like the one that fires the add_to_cart GTM event.

2024-09-23 - version 2.0.1
* Fix: * Fix an edge case that could cause a fatal error in admin_body_class().

2024-09-11 - version 2.0.0
* Remove: Starting with GTM Kit version 2.0, the add_to_wishlist event is no longer supported in the free version of GTM Kit. To continue tracking the add_to_wishlist event, you must purchase the GTM Kit Add-On plugin.
* Add: A notifications handler has been added to communicate issues and notifications that require the user’s attention.
* Add: Added a warning when other Google Tag Manager plugins that may cause a conflict are active.
* Add: WooCommerce users are advised to install a supported SEO plugin to take advantage of a default category in data layer items.
* Changed: Require WordPress 6.3.
* Changed: Require WooCommerce 8.3.
* Changed: Require PHP 7.4.
* Dev: Increased PHPStan analysis level to 6, enhancing static code analysis and catching potential issues earlier in the development process.


2024-08-22 - version 1.23.3
* Fix: Prevent fatal errors caused by invalid filter input from third-party plugins.
* Fix: In WordPress versions prior to 6.6, the options pages fail to load due to a missing dependency.

2024-08-13 - version 1.23.2
* Dev: Require WooCommerce 8.2.
* Dev: Tested up to WooCommerce 9.2.

2024-07-15 - version 1.23.1
* Update: The 'Getting Started' section the setup wizard has been updated with new content.
* Fix: The settings were not saved correctly in multisite installations.
* Fix: An upgrade function was causing problems for multisite installations leading lost configuration.
* Dev: The load priority of the script 'gtmkit-js-before' has been lowered from 1 to 5 to allow user to register scripts before.

2024-07-04 - version 1.23
* Add: Added an option to exclude selected user roles from tracking.
* Add: Improve the flexibility of GTM Kit integrations.
* Dev: Tested up to WooCommerce 9.1.
* Dev: Tested up to WordPress 6.6.
