GA4 Convert - Free Open Source Tool

This is a set of SQL scripts for analysts who wish to simplify their work with GA4 BigQuery export.
They produce a clean relational data structure with strongly typed fields, suitable for querying with SQL and BI tools, and flag errors.

GA4 export is not "analysis-ready" by default - it is an event stream. Event parameters are recorded in arrays that are difficult to query and are often messy: numbers arrive as strings, booleans are inconsistently represented, dates come in multiple formats, the same parameter can appear with different types across events.

GA4 Convert produces tables with stable, familiar grains:

  • sessions
  • pageviews
  • tracked events (configurable by analyst)
  • event parameters

It also defines a set of standard views that flatten common event parameters into fixed columns. Analysts can query "forms", "downloads", "outbound clicks", "site search", and "videos" without repeatedly unpacking parameters. This makes it much easier to answer questions like: "What happened in this session?", "Which pages led to a form submit?", or "How many file downloads came from this landing page?"

Canonical, coerced event parameters: values are coerced into typed columns (or NULL), and coercion failures are explicitly flagged. This gives you a reliable foundation for monitoring, learning rules later, and building consistent analysis views.

De-duplication of events. The likely duplicates are flagged based on a composite key. In our tests, the flags correctly identified duplicates when tags fired more than once.

Simplified engagement data. You don't need to know how many minutes the visitor spent on page - you need to know if they engaged with the content. The scripts generate attributes that report the level of engagement at the pageview and session level. You can adjust the calculation rules in SQL or via the prompts.

Sources and media mapping. To get consistent naming of medium and source fields, the scripts translate the raw values into the mapped ones, if provided.

Anomalies report. The scripts include checks for presence of mandatory parameters, correct types and value ranges - so that you detect events schema drifts in a timely manner.

GA4 convert is open-sourced under MIT license. Published sources include both the SQL scripts and the AI prompts used to generate them, which also serve as documentation. 👉Download from Github .

© sys2biz Pty Limited, 2025 | Privacy Policy | Analytics permissions | LinkedIn | Facebook