Blast Analytics and Marketing

Analytics Blog

Supporting Leaders to EVOLVE
A group of people around a laptop
Category: Digital Analytics

Improve Your GA4 Reporting with BigQuery Sessionized Tables

August 18, 2022

A few months ago, I wrote an article touting the benefits of using BigQuery custom SQL inside Data Studio—Google’s free visualization suite for analytics data—and explained how this method could be used to produce eCommerce funnel reports.

Shortly after that article was published, a few of my teammates mentioned that they’d love to see how we could use Data Studio with customized GA4 data. I enjoy exploring interesting use cases for Data Studio and often find myself pushing the envelope as I look for ways to answer complex questions, so I was happy to start experimenting with the possibilities.

Many businesses have heard and begun to act upon the news that “Universal Analytics will no longer process new data beginning July 1, 2023”, so I anticipate attention will soon shift from implementing GA4 analytics to extracting insights from your new data.

In my opinion, GA4 reporting methodologies—such as the built-in GA4 Reports and Explorations—are still in their infancy, with continued development and improvement plans hopefully in the works. Even though GA4 reporting solutions are available now through the administration pages, they will face limitations when it comes to highly customized reports that reach beyond traditional capabilities. In my book, BigQuery wins for having the most accurate data and the best range of options for event-level flexibility.

Bridging the Gap: How to Make GA4’s Event-Centric Data Work for You

Two colleagues compare notes

It’s easy to recognize that the mandated change to GA4 is a difficult one. As GA4 data becomes available, it’s logical for us to want to build reports similar to those used for previous analysis. And perhaps not surprisingly, our clients want to continue to view dashboards and metrics that they’re familiar with after working with Universal Analytics data for so many years.

Out of the gate, GA4 data is completely event-centric—not session-centric. Universal Analytics did a lot of great aggregation for us, and even applied default user attribution rules; but simply connecting Data Studio to GA4 data and expecting similar reporting data is a lot to ask.

As I attempted to construct such reports during my experimentation, I realized I wanted an already transformed table that mapped the data I needed using the raw event-structured GA4 data. It would be ideal to see a schema focused around sessions, as is prevalent in the majority of existing Universal Analytics reports. Unfortunately, GA4 data in this structure is currently not readily available via BigQuery.

My “Aha” Moment: Transforming GA4 Event Data into Session Data with Looker

Two colleagues working at a desk

A recent client project required me to convert a suite of analytics reports from utilizing Universal Analytics data to utilizing GA4 data within Google’s Looker business intelligence platform.

One of Looker’s strengths is strong data governance; and as I began the reporting conversion task, I discovered that Looker had built a transformational GA4 component. Since Looker is built on a series of LookML blocks, they’ve already created a methodology to construct session-based intermediary tables that perform exactly the type of transformation I’d been looking for.

Inside Looker, a clever extraction of GA4 event data is transitioned to a cached and sessionized internal table. Using this internal table schema, Looker designers can draft and create “Looks”. These “Looks” then become elements in dashboards, which take advantage of the internally transformed data.

Armed with a new methodology for transforming raw GA4 event data into session data, I determined the next course of action in my mission to power commonly requested reports would be to schedule a daily GA4 sessionized table creation process. This step relies on the Looker sessionized view, and establishes a new partitioned table in BigQuery on a daily basis.

Scheduling view in GA4

Here are a few advantages to this approach:

  • You’ll now have a data set organized around a session-per-row schema.
    Subsequent queries for individual metrics can be run against this new daily table, without the need for processing large volumes of raw GA4 event data beforehand. This can lead to a significant reduction in BigQuery processing costs.
  • Since the daily transformation processes event-level data, it can also parse or replicate specific attribution logic like last non-direct click for individual sessions.
  • Many common Universal Analytics-style reports can be built in Data Studio using session-oriented custom SQL statements as connectors, exposing an array of common metrics and dimensions.
  • In contrast to using the GA4/Firebase connector directly, both the raw and transformed BigQuery GA4 data contain no sampling or added estimated visitor data from a machine learning inference model.
  • Re-processing of this sessionized table extraction is possible (at an added cost) if, for example, you wish to introduce a change to the logic or filters.

A dashboard with sessionized data

Creative Solutions: The Key to Uncovering the Story in Your GA4 Data

Colleagues celebrate success together

Many of my teammates recognize my tendency to “nerd out” when it comes to finding creative reporting solutions; but as far as I can tell, this one has a lot of promise for turning event-focused data into coveted session-focused GA4 data. And the way I see it, if a solution’s been built by a Google (Looker) team dedicated to GA4 reporting as a solution to this problem, then why not share the concept?

As an added bonus to those clients in the Tableau or Power BI communities who recognize the need to connect a GA4 profile directly: this solution of daily scheduled tables works to power your reports too, as both of these reporting suites can connect to BigQuery through the use of custom SQL.

If you’ve just started your GA4 journey and need a partner who can help you reveal the stories behind the data, contact our data insights team. We’re here to guide you through the challenges of your GA4 transition with solutions tailored to meet your unique needs.

Paul Lear
About the Author

Paul is a Senior Analytics Consultant and Data Scientist at Blast. He has spent 20+ years venturing into the depths of software development, designing and implementing analytic solutions to automate business processes within all sizes of financial services institutions. Paul's experience spans software development, Business Intelligence design, eCommerce, database design, predictive modeling, and adaptive decision systems.

Connect with Paul on LinkedIn. Paul Lear has written on the Blast Digital Customer Experience and Analytics Blog.

We’re here to help with tips and insights on the following topics:

Data Management Digital Analytics Digital Experience Digital Transformation Marketing Activation User Privacy
HIPAA and Analytics White Paper CTA

Featured White Paper

Healthcare Analytics and HIPAA: Ways to Minimize Risk and Ensure Compliance

The rise in digital data and analytics adds complexity and risk for healthcare organizations. Those that don’t comply with data privacy requirements, including Health Insurance Portability and Accountability Act (HIPAA), could face heavy fines, civil action lawsuits, and even criminal charges. Not to mention loss of patient trust.

Download the White Paper

Ready To Do More With Your Data?

If you have questions or you’re ready to discuss how Blast can help you EVOLVE your organization, talk to an Analytics Consultant today.

Call 1 (888) 252-7866 or contact us below.