6

When sending events to GA4 is there a way to override user ip, if using universal analytics you could have passed a user_ip variable uip but for GA4 I dont see a param option to pass user ip. Any help would be appreciated

Rtrader
  • 917
  • 4
  • 11
  • 26

2 Answers2

3

OK found a temporary solution here.

instead of &uip=x.x.x.x in the url, add &_uip=x.x.x.x.

Google tends to prefix alpha/beta URL parameters with underscore _

Taliesin
  • 171
  • 15
-5

No parameter is necessary:

For Google Analytics 4 properties, IP anonymization is enabled by default. The content provided below describes the IP anonymization process for legacy Google Analytics tags.

Source

So this isn't even handled on the level of code (i.e. you couldn't enable it if you tried), it's built into the property.

Eike Pierstorff
  • 31,996
  • 4
  • 43
  • 62
  • This assumes you are using gtag to send events, im talking about using measurement protocol – Rtrader Aug 23 '21 at 20:23
  • This assumes your property is GA4. This is built-in at the property level, not something you set inside your request. – Eike Pierstorff Aug 23 '21 at 20:44
  • Btw. it has been this way since the beginning when it was still called App&Web. If you do not believe me, would you believe GTM/GA Guru Simo Ahava? https://www.simoahava.com/analytics/getting-started-with-google-analytics-app-web/ - look in the comments (I know, appeal to authority, but he is Google Developers Experts and has work with that pretty much from the start). – Eike Pierstorff Aug 23 '21 at 20:50
  • 1
    IP anonymization masks the given IP. IP override is another thing. https://support.google.com/analytics/answer/2763052?hl=en – Mohammad Nikravan Feb 03 '22 at 09:46
  • @MohammadNikravan you are obviously right and I have no idea how I came up with that answer. – Eike Pierstorff Feb 03 '22 at 09:51