X (Twitter)

Discord

GitHub1.1k
1.85 min read

v1.3.3 — GTM Support, CookieBanner Focus Toggle, Next.js URL Validation

Posted By

Christopher Burns
Consent Team
Christopher Burns

Patch Changes

  • b4d53be: feat(core): added Google Tag Manager support
  • fix(react): allow trapFocus={false} in CookieBanner
  • fix(nextjs): improved URL validation

Updated Dependencies

  • Updated dependencies [b4d53be]
    • @c15t/react@1.3.3

Usage Notes

  • Google Tag Manager (GTM) support is opt-in. Ensure your configuration provides the correct container ID and that GTM events are only dispatched after consent is given.
  • Experimental: GTM integration is currently experimental and not recommended for production. See the Next.js guide: Google Tag Manager.
  • You can now disable focus trapping in the cookie banner when embedding in modals or constrained layouts:
<CookieBanner trapFocus={false} />
  • Next.js URL validation is stricter. Use a valid URL for any configuration values (e.g., backend URL). Environment variables should contain absolute URLs (https preferred) or valid relative paths depending on your deployment.
export const c15tConfig = {
  backendURL: process.env.NEXT_PUBLIC_C15T_URL,
};

Technical Details

  • Core adds GTM integration hooks that respect consent categories before dispatching events.
  • React CookieBanner now supports trapFocus={false} without side effects on keyboard navigation outside the banner.
  • Next.js performs additional checks to prevent malformed URLs from being used at runtime.

Migration

  • No breaking changes.
  • If your app relied on loosely formatted URLs, update them to valid absolute/relative URLs to pass the new validation.

🧪 Tests

  • Added assertions around GTM gating based on consent state.
  • Verified focus behavior with trapFocus={false} to maintain accessibility expectations.
  • Expanded URL validation scenarios for Next.js configuration inputs.

✨ What's Changed

Published via commit b4d53be by @github-actions

Full Changelog: c15t@1.3.2...c15t@1.3.3

Thank you to our contributors

c15t.com