Server-Side Streaming to BigQuery Using Hardal Gateway
Send real-time server-side data to BigQuery using Hardal Gateway with your custom domain.
In server-side measurement, Google BigQuery is a powerful tool for analyzing large datasets, but streaming data into BigQuery in real-time can be a challenging task.
Maybe you've been using BigQuery by linking it with your Google Analytics 4 property, but there's no need to limit your event requests to linking GA4 to BigQuery to daily streaming.
Because sometimes Google Analytics 4 or any third-party analytics tool couldn't track your all requests, because of ad-blockers can disrupt your data like (not-set), undefined, etc. in dimensions.
Also trusting solely on just one analytics tool, such as Google Analytics, may not provide the %100 data accuracy because of ad-blockers, third-party client-side cookie usages, or GDPR compliances.
In this step-by-step guide, we will walk you through the process of real-time streaming into BigQuery using our Hardal Server-Side Gateway, highlighting the benefits of cookieless server-side streaming and the use of custom domains to bypass adblockers.
Start by creating a new project that will serve as the foundation for your real-time streaming setup.
Hardal Server-side gateway will already work on your custom domain, like ss.yourexample.com/api...
Access your newly created project and navigate to the Integrations & API section.
In this section, you'll need to configure your BigQuery credentials. This typically involves generating service account keys and granting the necessary permissions for accessing BigQuery. Ensure that you securely store these credentials for future use.
Next, set up event mapping for sending data to BigQuery. Within your server-side gateway configuration, define how incoming events or data should be mapped to specific BigQuery tables or projects.
This step is crucial for optimizing your server-side gateway efficiently. You can specify which events go to which tables or projects, allowing you to manage and analyze your data effectively.
Monitor the process to ensure that the data is being correctly routed to the specified BigQuery tables or projects.
You can also use the Event Builder to test and generate your server-side and cookieless event request URLs to BigQuery.
All your parameters will become columns in BigQuery, automagically 🪄
You can also test your server-side event request using cURL.
curl -X POST "https://ss.yourexampledomain.com/api/ss-collect?projectId=<your-project-id>&eventType=custom_event&eventValue=conversion_goal" -H "Content-Type: application/json" -d '{"eventData":{"key1":"value1","key2":"value2"}}'
eventData can contain any key-value pairs. This flexibility allows you to leverage the Hardal server-side gateway for cookieless, server-side tracking on your e-commerce website, and seamlessly integrate it with your any CRM data. 🪄
Happy server-side tracking! ✌️