danni-cool / node-gtag4

A lightweight, browser api free, Node.js version of the Google Analytics SDK, the data reporting is accepted by Google Analytics 4.
MIT License
5 stars 2 forks source link

How to replace unique identifier with user IP address? #2

Open leminhyen2 opened 1 year ago

leminhyen2 commented 1 year ago

Hey, I have been using this package on a desktop app and it accurately track user's location. I tested it on a server but doing so will log only the location of the server not user's location. Is there a way I can add user's ip address as a parameter so ga4 can track location accurately? Like with universal analytics, there was "uip" parameter that did exactly that Thanks

danni-cool commented 1 year ago

thanks for your feedback. node-gta4 tracks location in the node environment by default, and it does easy to add 'uip' in reporting requests, I'll test that recently.