After setting up Stape and sGTM using a Cloudflare worker, Google Analytics now reports all users as being from Germany and Netherlands (The Stape server I picked is in the Netherlands). I know 90%+ are from Denmark and this was reported correctly in Google Analytics when using gtag.js.
"logData": {
"DownstreamContentSize": 422,
"ResponseStatusCode": 200,
"Duration": 22797207,
"RequestContentSize": 0,
"RequestHost": "redacted",
"RequestMethod": "GET",
"RequestUrl": "redacted",
"RequestProtocol": "HTTP/2.0",
"response_Cache-Control": "no-cache",
"response_Content-Type": "text/plain",
"response_Set-Cookie": "redacted",
"response_Trace-Id": "redacted",
"response_X-Accel-Buffering": "no",
"response_X-Content-Type-Options": "nosniff",
"request_Accept": "*/*",
"request_Accept-Encoding": "gzip, br",
"request_Accept-Language": "da-DK,da;q=0.9,en-US;q=0.8,en;q=0.7",
"request_Cf-Postal-Code": "9900",
"request_Cf-Region": "North Denmark",
"request_Cf-Region-Code": "81",
"request_Cf-Timezone": "Europe/Copenhagen",
"request_Priority": "u=1, i",
"request_Referer": "redacted",
"request_Sec-Ch-Ua": ""Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"",
"request_Sec-Ch-Ua-Mobile": "?1",
"request_Sec-Ch-Ua-Platform": ""Android"",
"request_Sec-Fetch-Dest": "empty",
"request_Sec-Fetch-Mode": "cors",
"request_Sec-Fetch-Site": "same-origin",
"request_Sentry-Trace": "redacted",
"TraceId": "redacted",
"request_User-Agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Mobile Safari/537.36",
"ClientIP": "redacted",
"request_X-Replaced-Path": "/redacted"
}
I see that ClientIp belongs to Cloudflare which I assume is causing the problem. Is there a way to have the original IP included?