Leniolabs / ai-data-dashboard

MIT License
66 stars 31 forks source link

Google Analytics 4 (gtag) #10

Closed edlugora96 closed 1 year ago

edlugora96 commented 1 year ago

This pull request adds a new component called "gtag" that provides a simple way to connect your website to Google Analytics using the latest version 4 of the API. The gtag component supports all the features of the GA4 API, including event tracking, user properties, and custom dimensions.

It's important to note that in order to fully utilize the "gtag" component added in this pull request, it's necessary to define the process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID environment variable in your code. This variable is used to specify the Measurement ID for Google Analytics, which is required for the component to function correctly.

This pull request makes it easy to integrate Google Analytics v4 into your project and start collecting valuable data on user behavior. I hope you find it useful!

apresmoi commented 1 year ago

Hello @edlugora96, thanks for the PR, looks OK.