How to Add Google Analytics 4 (GA4) in Next.js 14 (GDPR opt-in Cookie Banner)

  Рет қаралды 1,992

Max Rohowsky (Max on Tech)

Max Rohowsky (Max on Tech)

Күн бұрын

Пікірлер: 17
@codewithmoses
@codewithmoses 2 ай бұрын
Honestly I was looking for this so long. Thanks for sharing.
@mafterr11
@mafterr11 4 ай бұрын
First to make a tutorial about this properly..finally
@MaxRohowsky
@MaxRohowsky 4 ай бұрын
haha yes, this was also my thought
@mafterr11
@mafterr11 4 ай бұрын
@@MaxRohowsky was struggling with the cookie banner, not gonna lie... and nothing online.
@talakolavijaykumarreddy1843
@talakolavijaykumarreddy1843 2 ай бұрын
Not first actually the same video as made by @Ryan Gaudion way earlier
@brazilian_orthodox
@brazilian_orthodox 4 ай бұрын
Thank you! Finally a good tutorial on the subject. Earned a sub.
@MaxRohowsky
@MaxRohowsky 4 ай бұрын
haha I share the frustration. There really wasnt any good video out there. :D
@mzafarr
@mzafarr 20 күн бұрын
Amazing video, just wanted to confirm does the GoogleAnalytics component provided in next/thirdparties not doing everything? are somethings missing?
@BhargPatel-z9c
@BhargPatel-z9c 2 ай бұрын
But script is not updating from "denied" to "granted". did you checked it?
@romanm9638
@romanm9638 3 ай бұрын
Like, subscribe!
@MaxRohowsky
@MaxRohowsky 3 ай бұрын
Thanks for the sub!
@hotelcolonialfoz
@hotelcolonialfoz 29 күн бұрын
How to do it with GTM?
@sergiigulaga1486
@sergiigulaga1486 3 ай бұрын
I am not sure is good idea to embedded code without @next/third-parties/google . Your perfomance page can be low down.
@MaxRohowsky
@MaxRohowsky 3 ай бұрын
Interesting... didn't think that would be an issue...
@awais_ansarii
@awais_ansarii 4 ай бұрын
@KaiWollherr
@KaiWollherr 4 ай бұрын
Hi there, is there anyone who had the same issue? I cant set my buttons to true or false with this approach. setCookieConsent(false)}> Ablehnen setCookieConsent(true)}> Erlauben Initially its set to null like in the tutorial. Now it tells me that its not possible to set it to true or false. Argument of type 'false' is not assignable to parameter of type 'SetStateAction'.ts(2345)
@MaxRohowsky
@MaxRohowsky 4 ай бұрын
Hi Kai, this typescript error happens when you try to set a boolean value to something that only accepts null. Change the code to useState(null).
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
How to Add Google Analytics 4 (GA4) in Next.js 14
5:26
WebDevJan
Рет қаралды 5 М.
Favicons the Right Way
18:07
Colby Fayock
Рет қаралды 12 М.
How to add Google Analytics to your React/Next.js app
13:10
Chris Cooper
Рет қаралды 29 М.
This is why your site might need a cookie banner
5:09
Web Dev Cody
Рет қаралды 26 М.
Cookies in NextJS: Easy To Learn & Super Useful!
16:51
Josh tried coding
Рет қаралды 46 М.
GitHub Copilot in VSCode: Top 10 Features Explained
8:44
Max Rohowsky (Max on Tech)
Рет қаралды 122 М.
How to set up Google Analytics 4 property + 5 things you must do NOW
11:30
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 103 М.
SEO Is A Waste Of Time in 2025
11:56
Wes McDowell
Рет қаралды 398 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН