Server-Side Streaming to BigQuery Using Hardal Gateway

Send real-time server-side data to BigQuery using Hardal Gateway with your custom domain.

Published on September 17, 2023

Berkay Demirbas
Berkay Demirbas


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.

Step 1: Creating a New Project

Start by creating a new project that will serve as the foundation for your real-time streaming setup.

Create a new project in Hardal

Hardal Server-side gateway will already work on your custom domain, like…

Step 2: Integrating BigQuery with Hardal Server-Side Gateway

Access your newly created project and navigate to the Integrations & API section.

Integrate BigQuery

Step 3: Authorizing to BigQuery

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.

Authorizing BigQuery

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.

Step 4: Testing and Viewing Your Events in BigQuery

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.

Test and View Your Events in BigQuery

All your parameters will become columns in BigQuery, automagically 🪄

Test and View Your Events in BigQuery

You can also test your server-side event request using cURL.

curl -X POST "<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! ✌️

Ready to take the next step?

Explore how Hardal can help growth by server-side customer data to help your marketing mix and campaign optimization cookieless customer experiences.