Discrepancy between GA4 BigQuery data and server-side events

We’re currently using GA4 for event tracking in our mobile game and have implemented server-side Google Tag Manager (sGTM) following the guide here: link to blog. We’ve also configured some tags to route events to Pub/Sub (By Stape) and BigQuery (By trakken)

We’ve noticed a discrepancy between the events exported to BigQuery from GA4 and the data received on our server (both Pub/Sub messages and our BigQuery dataset). Our server-side data consistently shows about 10% fewer events compared to the GA4 BigQuery export.

Our investigation suggests that this issue might be related to an issue of client-side sGTM host migration. Some clients seem to be unable to fetch the updated configuration and continue sending events directly to the GA4 analytics server instead of routing them through sGTM.

Questions:

  • Are there any solutions to ensure consistent event volume reception despite potential client-side configuration issues?
  • Is there a way to bypass the configuration loading and hardcode the sGTM host within the app to ensure consistent event delivery in these regions
  • Can Stape’s Google Tag gateway help guarantee that we receive all event data?

Yes, it sounds like in some cases GA4 events are sent directly to GA rather than through your server container.
Most often the reason for this is that your event tag fires before the Google tag does.
What you can do:

  1. Ideally make sure that GT is always triggered before the event tag. Often you will need to use a trigger groups for this.
  2. Add the server_container_url parameter not only to the google tag, but also to all GA4 event tags (so the tags will know before the gtag loads that they need to use this url).

Alternatively you can configure parallel data sending to sGTM using another method (e.g. use Data Tag - Data Client). This way for Pub/Sub you don’t have to depend on the nuances of how GA4/Gtag works.