Closed manuelcoders closed 4 months ago
While it's possible to send events to Google Analytics solely with measurement protocol, only partial reporting may be available.
There are various sites out there that explains how the gtag events works, but some of the initial data is randomized. I was looking into this earlier, but decided that it was not worth the hassle. This is also why Event: PageView exists as deprecated. It works, but is not meant to be used this way.
I think the closes you will get is utilizing firebase or some sort of middleware-url (configurable in gtat), but not sure how this would be done properly.
I'm very disappointed.
It would be very convenient for me to be able to do everything on the server side. I've done a lot of research but I've never found anyone who succeeds, probably because there are reserved events like session_start with can't be called server side.
I'm sorry to dissapoint.
You can try to figure out how gtag calls the analytics server and run replicate those request from backend, but not sure how you would handle the cookies and stuff.
Otherwise another idea could be to recreate the views by reading the data from bigquery with looker studio....
I'm working on it, thanks so much for the replies!
HI, have you ever managed to track on GA4 without using the gtag.js part to get user identifiers?
I tried, but I can't see the complete data on GA4, perhaps because the session_start event cannot be sent via API.
I would like to do completely server tracking, do you think it's possible in some way?