GTM Kit 2.9: Region-scoped consent and a JS API for CMPs

GTM Kit 2.9 is focused on consent flexibility. If you serve visitors both inside and outside the EU, or you rely on a consent management platform that needs to talk to GTM Kit, this release closes two specific gaps.

You can now apply Consent Mode v2 defaults to specific countries or regions (for example DK, DE, US-CA) instead of one default state for every visitor.

This matters when your traffic is mixed. EU visitors should land on a strict denied-by-default state for GDPR. Visitors outside the EU can be set to a more permissive baseline. Before 2.9, you had to pick one default for everyone. Now each default is scoped to the regions where it applies, using the region parameter built into Consent Mode v2.

A JavaScript API for CMPs and partner scripts

Other plugins and partner scripts can now talk to GTM Kit through a small JavaScript API. Two surfaces:

// Push a consent update from your CMP or custom code
window.gtmkit.consent.update({
  ad_storage: 'granted',
  analytics_storage: 'granted',
  ad_user_data: 'granted',
  ad_personalization: 'granted',
});

// React to consent changes elsewhere on the page
window.addEventListener('gtmkit:consent:updated', (event) => {
  console.log('GTM Kit consent updated', event.detail);
});

The intent is CMP coexistence. If your consent platform already handles Consent Mode itself, leave GTM Kit’s defaults off and call update() when consent changes. If GTM Kit owns the defaults and another script needs to react, listen for gtmkit:consent:updated.

Other changes in 2.9

Wait For Update is now a proper number field with a 500 ms default on new installs. Existing values are kept untouched.

Clearer Consent Mode warning. If Cookiebot, Complianz, CookieYes, or Cookie Information already handles your consent, the admin page now tells you to leave the GTM Kit setting off, rather than have two plugins fight over the same gtag('consent', ...) call.

Bugfix (premium): Webhooks for Server-side Tracking on the WooCommerce integrations page no longer stay locked after you enter an sGTM Container Domain.

Quality, behind the scenes

GTM Kit now ships with an internal automated test suite (PHPUnit + Vitest) and continuous integration across PHP 7.4 through 8.4 on WordPress 6.9. No functional change in this release. Every future release is verified by unit and integration tests before it goes out.

Get GTM Kit 2.9

Update from your WordPress dashboard, or download from WordPress.org. Full changelog at gtmkit.com/changelog. For server-side tracking, full WooCommerce coverage, and the rest of the consent suite, see GTM Kit Woo.

Posted in #

GTM Kit Avatar

Leave a Reply

Your email address will not be published. Required fields are marked *