---
title: "Comment by Matheus Paiva on \"Integrating Google Analytics 4 with Next.js 📈\" | Hashnode"
description: "Hello, thank you for the guidance! I don&#39;t know a lot about analytics and I am having a hard time trying to identify which ID is the right ID to use with GA"
url: "https://hashnode.com/posts/integrating-google-analytics-4-with-nextjs/603f72cefb37920a1fc64da7/comment/60d721abcb0aa8118c23b495"
---

[Discussion](https://hashnode.com/posts/integrating-google-analytics-4-with-nextjs/603f72cefb37920a1fc64da7)

Comment [Integrating Google Analytics 4 with Next.js 📈](https://hashnode.com/posts/integrating-google-analytics-4-with-nextjs/603f72cefb37920a1fc64da7)

[Matheus Paiva](https://hashnode.com/@matheuspaiva)

[Jun 26, 2021](https://hashnode.com/posts/integrating-google-analytics-4-with-nextjs/603f72cefb37920a1fc64da7/comment/60d721abcb0aa8118c23b495)

Hello, thank you for the guidance!

I don't know a lot about analytics and I am having a hard time trying to identify which ID is the right ID to use with GA4.

My company uses Google Analytics and the ID has this shape: UA-xxxxxxxx-x, but I think this is not the ID I should be using with this estrategy, right?

Is it the google tag manager ID? Or something else? Thank you!

[Andrei Zgirvaci](https://hashnode.com/@andrei-zgirvaci)

[Jun 28, 2021](https://hashnode.com/posts/integrating-google-analytics-4-with-nextjs/603f72cefb37920a1fc64da7/comment/60d721abcb0aa8118c23b495#reply-60d95c3b68364a2e7b2cd78d)

Thanks!

It looks like you are using [Universal Analytics](https://support.google.com/analytics/answer/2790010). In that case, I suggest you use [react-ga](https://github.com/react-ga/react-ga) library to manage your Google Analytics.

Hope this helps :)

[Matheus Paiva](https://hashnode.com/@matheuspaiva)

[Jun 28, 2021](https://hashnode.com/posts/integrating-google-analytics-4-with-nextjs/603f72cefb37920a1fc64da7/comment/60d721abcb0aa8118c23b495#reply-60d95f5d703d372ea06c712d)

[Andrei Zgirvaci](https://hashnode.com/@andrei-zgirvaci) yep! I ended up just doing that and it worked very well. Thank you!
