Replies: 3 comments
-
I am also having the same error, any suggestions? |
Beta Was this translation helpful? Give feedback.
0 replies
-
As a workaround I'm loading GTM on the client side only with useEffect:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I've made another discussion here with a suggestion too #5244 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey!
We're trying to implement Cookiebot in one of our websites, but we're stuck with
hydration
errors. At first we included the script directly (which failed) and also tried with GTM, but it won't work.We think this is caused by the external script altering the DOM. For example, now we have GTM:
Returned from the server:
<script async="" src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXX">
But on the client we get this error:
Prop `src` did not match. Server: "https://www.google-analytics.com/analytics.js" Client: "https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXX"
Moving the script around, adding keys/ids all had no success..
Any suggestions for us to make this work? 🙌
Beta Was this translation helpful? Give feedback.
All reactions