-
Delayed visibility of GA4 events in real-time analytics
Hey, I’m playing around with POST-ing GA4 analytics events using the same details a web app would use:
curl -X POST "https://www.google-analytics.com/collect?v=2&tid=<MY_TID>&cid=<MY_CID>&t=event&en=someNonsense&ep.aParameter=value&z=1234567890" -H "Content-Type: text/plain;charset=UTF-8" -H "sec-fetch-mode: no-cors" -H "sec-fetch-site: cross-site" -H "sec-fetch-dest: empty" -H "pragma: no-cache" -H "cache-control: no-cache" -H "origin: http://localhost:5000" -H "content-length: 0" -H "accept-language: en-US,en;q=0.9" -H "accept-encoding: gzip, deflate, br" -H "user-agent: dummy"
Everything shows up in the realtime view just fine, and if I add ‘&_dbg=1’ to the URL, events and parameters are also all good in the DebugView.
But after waiting for 48 hours, nothing shows up. I tried several things to fix this, like adding all event parameters as custom metrics, disabling the default internal traffic filter, and even going through the gruelling process of agreeing to the “Data Processing Terms”. Then, I waited for another 48 hours but no dice.
Weirdly enough, everything works just fine when I use a browser with firebase-analytics.js.
Does anyone have a clue what’s going on? Did I break something or have I missed something silly?
I’m beginning to wonder if Google’s doing some extra processing on events to ensure they’re actually coming from a real webpage. I’ve tried to mimic browser HTTPS requests but my events still aren’t getting recorded. Any tips or advice would be hugely appreciated!
Log in to reply.