How to install the cookie banner on the Next.js 12 and 11 versions?
Last updated on June 2, 2025
import Script from 'next/script';<script src={'https://cdn-cookieyes.com/client_data/XXXXXXXX/script.js'}>
</script>Note:
You need to replace ‘XXXXXXXX’ with your CookieYes website key.

strategy="beforeInteractive"
Note
CookieYes does not support the crossorigin attribute, as it may cause caching issues when used with the CookieYes script. If your website automatically adds this attribute when using the Next.js script component, we recommend using the standard <script> tag provided by CookieYes (installation script) instead to ensure that updates are applied immediately.