NuxtN
Nuxt2y ago
grip

Third-party script hydration mismatch

Hey, I have a third-party script for my CMP which modifies part of the <body> to add the elements required to show the cookie banner.

The script is loaded with async and defer.

When these elements are added, I get a hydration error.

Using the app:mounted hook or some fixed timeout to show the banner is a solution but then i get a hit in LCP. Any recommendations on how to approach this?

thanks!
Was this page helpful?