How to add Google Analytics to your Next.js application (quick & easy)

Поділитися
Вставка
  • Опубліковано 15 вер 2024

КОМЕНТАРІ • 64

  • @syandanax
    @syandanax 3 роки тому +3

    This video helped me a lot. Thanks for this amazing video!

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  3 роки тому +1

      Thanks! Im glad to hear you found it helpful.

  • @coryarmbrecht
    @coryarmbrecht 3 роки тому

    For what I needed, this video was superb. You described things clearly in an organized manner. I learned multiple things and I know I would have had issues trying this out, without watching this. Thank you and great job.

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  3 роки тому +1

      Glad it was helpful!

    • @wayofgod143
      @wayofgod143 Рік тому

      @@TuomoKankaanpaa why for me view for page title and screen name not appearing @Tuomo Kankaanpää pls reply sir

  • @innoxgraphics3269
    @innoxgraphics3269 2 роки тому +1

    This was pretty straightforward 😊😊

  • @adithyasundar8904
    @adithyasundar8904 3 роки тому +1

    Hey Tuomo , Great tutorial !

  • @yhr4052
    @yhr4052 2 роки тому +1

    Hey Tuomo, great explanation as usual.
    2:50 Please note that the linked repository's last update doesn't contain the shown _document.js file - one needs to go to older commits to find it.

  • @doat2130
    @doat2130 3 роки тому

    This helped me out tremendously. Good instructions and explanations as well. Thank you so much and keep up the good work Tuomo!

  • @adeniyitaofik3832
    @adeniyitaofik3832 2 роки тому

    Avery nice and easy to understand video thanks

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  2 роки тому

      Thanks!

    • @Cinemakaka12
      @Cinemakaka12 Рік тому

      @@TuomoKankaanpaa @the it is only working for local host but i need in the stagging/production how to do that sir

  • @alfdocimo
    @alfdocimo 3 роки тому

    Awesome! Clearly explained. Thanks for sharing!

  • @explainliveimfive
    @explainliveimfive 2 роки тому

    Awesome stuff! Really appreciate it.

  • @adrianorodrigues698
    @adrianorodrigues698 3 роки тому +1

    Thanks for the video!

  • @oallanmendes
    @oallanmendes 3 роки тому

    Works like a charm!
    Thanks.

  • @malikblueberry9
    @malikblueberry9 2 роки тому

    thank you! that was really helpful for me today

  • @05124
    @05124 2 роки тому

    Thank you so much, appreciate your efforts very much.

  • @feossandon
    @feossandon 3 роки тому +1

    Thanks for this tutorial. I was wondering... how we can get the id Client? is it possible? any localStorage config or something?. Also I noticed that even if we put the ID in an env, it still appears on the network... weird. Cheers bro!

  • @sdsim1
    @sdsim1 Рік тому

    Thanks for sharing 👍

  • @adeniyitaofik3832
    @adeniyitaofik3832 2 роки тому

    in the example by vercel the script tags you placed in _document.js where placed in _app.js any difference there would like to know please

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  2 роки тому

      _document.js can update the html and body elements where _app.js updates only things inside the element, you can find more info on the differences here: nextjs.org/docs/advanced-features/custom-document and nextjs.org/docs/advanced-features/custom-app

  • @YOUdudex
    @YOUdudex 3 роки тому

    amazing awesome useful video, subscribed!

  • @quasarkid4256
    @quasarkid4256 2 роки тому

    Great tutorial thanks a lot!

  • @arvinbehshad
    @arvinbehshad 3 роки тому +3

    I must be the only one who can't get this to work. Even forked the nextJS example. There are 0 events showing up in the realtime tab.

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  3 роки тому

      Sorry to hear that man! I'd start by checking from devtools that your app is making request to GA and debugging from there!

    • @Antnix732
      @Antnix732 3 роки тому

      nope same problem for me, did you get it working?

    • @Cinemakaka12
      @Cinemakaka12 Рік тому

      @@TuomoKankaanpaa v it is only working for local host but i need in the stagging/production how to do that sir

  • @cristiannerylozada4713
    @cristiannerylozada4713 2 роки тому

    Thank u! It works :D 2022

  • @charlottehughes616
    @charlottehughes616 3 роки тому +1

    Would we need to get consent from the user when doing this to comply with gdpr?
    Thanks for the video, really helpful!

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  3 роки тому

      Great to hear! I’m not gdpr expert so unfortunately can’t say for sure everything it takes to comply with gdpr.

  • @sreekumarmenon
    @sreekumarmenon 2 роки тому

    example has been updated since, so make sure to look in next.js/examples.

  • @baobaostore
    @baobaostore 3 роки тому +1

    Adsense in nextJS better than adsense in WordPress? 🤔

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  2 роки тому

      Haven’t used adsense in wp so unfortunately I can’t say

  • @ivanmag646
    @ivanmag646 3 роки тому

    Great! Thank you.

  • @pavandongare5216
    @pavandongare5216 3 роки тому

    does it capture localhost events too? I think it only captures events coming from mentioned url.

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  3 роки тому

      Did you test it out? I'd say that it captures events coming from localhost too but no 100% sure

  • @geekySRM
    @geekySRM 3 роки тому

    Awesome!

  • @mattmckenzie7495
    @mattmckenzie7495 3 роки тому

    Thank you very much

  • @yusuffakhreddin263
    @yusuffakhreddin263 3 роки тому

    does this work with react ?

  • @cazterk
    @cazterk 3 роки тому

    what about adsense in nextjs?

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  3 роки тому +1

      I haven't used adsense with Next.js but I'd say it shouldn't be much different from adding GA.

    • @cazterk
      @cazterk 3 роки тому

      @@TuomoKankaanpaa alright I'm trying to implement it but resources are few and far between with not much clarity

    • @TuomoKankaanpaa
      @TuomoKankaanpaa  3 роки тому +1

      @@cazterk let me know how it goes!

    • @cazterk
      @cazterk 3 роки тому

      @@TuomoKankaanpaa awesome

  • @wayofgod143
    @wayofgod143 Рік тому

    why for me view for page title and screen name not appearing @Tuomo Kankaanpää