I need to generate data in a Google Analytics exploration report that isn't triggered by website actions, and I am using the GA4 measurement protocol in Spring. None of the data is updated in the website, so I am sending a daily scheduled report with database data (I am aware this isn't the best use of GA4, but I have no choice). At the moment, I have used my own cookie data, since the location from where the events are sent doesn't matter.
Unfortunately, while the data shows in real-time view fine, a lot of it is shown as "not set" in the exploration reports (these are all custom parameters). My only theory is that the cookie data might be affecting this, but it seems unlikely considering real-time view shows the data just fine. Additionally, even simple events such as a daily user count (using date and count params) does not load in the explorations (not set) 70% of the time. I am not able to load this data from the frontend, but any alternatives to using GA4 in a spring backend could work. Any help would be greatly appreciated.
I have done the following:
- Used the following tutorial to create custom events: https://www.youtube.com/watch?v=r_eoeU2qUn0&t=630s
- Loaded events data before and after creating custom definitions (I'm aware that only the data after the custom definitions should load in the explorations).
- Verified all data sent has shown correctly in the real-time view (there are never any errors sending from Spring to GA4).
- Waited over 48 hours to view data in exploration reports (still "not set").
- Checked nothing in https://www.analyticsmania.com/post/google-analytics-4-events-not-showing-up-in-reports/#:~:text=I%20recommend%20double%2Dchecking%20that,of%20the%20standard%20GA4%20reports) and https://www.analyticsmania.com/post/not-set-in-google-analytics-4/#:~:text=(not%20set)%20means%20that%20GA4,from%20being%20sent%20to%20GA4 applies (except the fact I'm using the GA4 measurement protocol).
- Always receive a 204 response code when sending events.
- Validated events created in GA4 event builder site.
It seams to me that the client_id must be a string and should contain a dot. In the event section you must have the two parameters session_id and engagement_time_msec, both as numbers (int). The engagement_time_msec should contain 1000. So 10 events with the same client_id and session_id will create an engadged user. Perhaps that will help.