Well, the next_public doesnt really do anything by itself, it's a way to remind you that your variable is public, the ones that dont start with next_public are meant to be private and used only on the server like api handlers, use server and server components
Is there a reason to include the Google Analytics tag as an environmental variable? It's in the of the doc so you'll download it with the page regardless.
For latecomers, this video is not using the Script tag that's introduced after Next 11, so be careful using the same method. Nice video!
can you please describe how to add this in new next js ?
figured out?@@vivekgupta1287
Minute 8:55! That is what fixed my problem with calling an env variable in my code. Thank you!
Glad it helped!
don't forget that the ones that start with NEXT_PUBLIC can be seen by anyone
@@jotaroisdarius1918 damn, is there a private method?
Well, the next_public doesnt really do anything by itself, it's a way to remind you that your variable is public, the ones that dont start with next_public are meant to be private and used only on the server like api handlers, use server and server components
This video not available on Next.js version 13.
Is there a reason to include the Google Analytics tag as an environmental variable? It's in the of the doc so you'll download it with the page regardless.
Good point, I only did that because it's used in multiple places so is easier to update in one place if I need to update the ID in the future
Hey what library are you using for the scheduler ?
Cal.com - Awesome OSS product
please do a video about adsense setup for next js 13
Great Video. I've been working on adding Google Analytics to my site. How to do it in Nextjs 13 App router case? With Typescript. Thanks Chris!
Nice! I'm not sure if there's any differences as not really worked with the new App router. Let me know how you get on!
@@ChrisCooper0 It is not working with latest App Router.
You can use it in root layout.tsx 🙄
Do we need to make the website go live or can we do it locally?
I believe it will work on localhost. Let me know if you give it a go!
Thanks Chris!
does it work instantly or i have wait 48 hours to start seeing analytics coz i have done everything still dont see any data in analytics
Yeah it can take a while but should be there after 48 hours if everything is set up correctly
how to check if everything is set up correctly
@@ChrisCooper0
How I'm I not seeing events. I can only see js and config in dataLayer
Can you see them after completing all the steps?
@@ChrisCooper0 the problem was that i had an ad blocker in my browser. It seems that add blockers block GA
Is it updated for Google Analytics 4?
I believe so but if I'm wrong the GA4 Setup Assistant looks to be useful
This video is really good! God bless you!
Glad it was helpful!
This is very basic. It won't register pageviews on route change