user-agent not forwarded
Closed this issue · 6 comments
With user agent forwarded, ga will show up browser and operating system details
Hello Jules! This open-sourced solution and DataUnlocker forwards all original headers to the proxy server, including User-Agent. Please open a new issue with more specific information if needed. Thanks!
If it's already pass then it's fine but, from my experience doesn't show up properly in google analytics. I've manually copy user-agent headers here, https://github.com/dataunlocker/save-analytics-from-content-blockers/blob/master/src/modules/proxy.js#L53, then it works, I recommend you to double-check this
Tested: I proxied headers to the "echo" back end via this container (it echoes incoming requests in the JSON format). I doubt all headers are proxied, here's the response from the echo back end:
{
"method": "GET",
"url": "/health-check",
"headers": {
"host": "localhost/*(ZXh5MzlvNWJzb2hoLm5pa2l0YS50aw)*",
"x-request-id": "59a0a061b221ec6b26eec4b48536721b",
"x-real-ip": "192.168.1.1",
"x-forwarded-for": "192.168.1.1",
"x-forwarded-host": "localhost/*(ZXh5MzlvNWJzb2hoLm5pa2l0YS50aw)*",
"x-forwarded-port": "443",
"x-forwarded-proto": "https",
"x-scheme": "https",
"content-length": "0",
"pragma": "no-cache",
"cache-control": "no-cache",
"sec-ch-ua": "\" Not;A Brand\";v=\"99\", \"Google Chrome\";v=\"91\", \"Chromium\";v=\"91\"",
"sec-ch-ua-mobile": "?0",
"dnt": "1",
"upgrade-insecure-requests": "1",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36",
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"sec-fetch-site": "none",
"sec-fetch-mode": "navigate",
"sec-fetch-user": "?1",
"sec-fetch-dest": "document",
"accept-encoding": "identity",
"accept-language": "en,en-US;q=0.9,ru;q=0.8,uk;q=0.7",
"accept-charset": "utf-8"
},
"body": ""
}
You can clearly see
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36",
Maybe, it's the problem with your setup?
Ok thx, I will double check
I suppose my issue was due to the delay of 24h in ga dashboard to show up data, thx for the help
Some people like @vitobotta complained about things not visible in GA dashboard as well :) This also not an issue with DataUnlocker. It's just Google Analytics realtime view isn't very reliable, but everything is taken into account in a while (some data is available immediately, and something can take up to 1 day to sync). I feel like I should document it somewhere.
Closing this issue for now, thanks for confirming.