Patch Changes
- b4d53be: feat(core): added Google Tag Manager support
- fix(react): allow
trapFocus={false}
inCookieBanner
- 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:
- 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.
Technical Details
- Core adds GTM integration hooks that respect consent categories before dispatching events.
- React
CookieBanner
now supportstrapFocus={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
- feat(core): add Google Tag Manager support by @BurnedChris in #283
- fix(react): allow
trapFocus={false}
inCookieBanner
by @KayleeWilliams in #291 - fix(nextjs): improved URL validation by @BurnedChris in #284
- Version Packages by @github-actions in #293
Published via commit b4d53be by @github-actions
Full Changelog: c15t@1.3.2...c15t@1.3.3