sGTM: Geo location not shown on map in realtime view of GA Dashboard

I started to test sGTM on Stape and the sGTM config is working mostly as expected. However, when I switch to the sGTM container (by providing a Server Container URL in my web container), visitor location is not shown anymore in the realtime view of my GA Dashboard. Adding the Geo-Plugin provided by Stape did not make any difference.

Could you please help me configure my sGTM container, so that geo loaction information is sent to GA and location is shown in the realtime view?

Hi Joost,

  1. The power-up you referring to has nothing to do with your objectives, so you can disable that.

  2. Do you perhaps use anonymiser in your GA4 setup? Please elaborate on how you have thing set up. The switch to s2s on it’s own would not affect what’s shown in realtime reports

Hi Dan, thanks for your prompt reply. I disabled all plugins (anonymiser + geo plugin) and it still does not show location on geo maps in GA dashboard.

I have compared the post requests to GA (those with ?collect) and I don’t see a difference between web container only setup and sGTM setup, so that’s fine.

In my sGTM container, in GA4 client, I enabled “Enable region-specific settings” with value “{{Visitor Region}}”. So that should be fine.

Can you confirm that when you switch to s2s with your setup that geo location is shown in realtime reports?

Ok, so:

  1. If you had anonymizer on and you were sending hits to /anonymise - depending on your anonymisation settings it could’ve been the reason for your situation

  2. Yes, I confirm that a clean setup done through the server would not anyhow affect the things you see in real-time reports.

Okay, thanks. That means it must be a configuration issue of the sGTM container. What’s your configuration on the sGTM clients for “Enable region-specific settings”?

Region-specific settings - are just that, specific settings which can be applied based on GEO headers, that, again, is not directly tied to your real-time map.

Okay, sorry, I am walking in the dark here. What parameters need to be sent to the GA client for real-time map to work? The most obvious to me is “ip_override” in the event data which is properly filled.

IP address is how GA4 determines your location by default, this is why I told you anonymiser may have been the reason. In a default situation you don’t need to do anything specific for map in real-time report to work

It seems my real-time report now shows a location (I do not know why, did not change anything), but the location for my IP is 400 km off! Interestingly, when I switch back to normal web container (without the sGTM server), the accuracy is much better (less than 10 km).

I compared with other location services and found out that accuracy based on my IPV4 is very bad, but accuracy based on my IPV6 address is much better. As Stape only forwards the IPV4 address it may explain why location is off.

Do you plan to include the IPV6 address in the “ip_override” field in the near future? I am pretty sure this will improve geo data a lot.