Skip to main content

🔒 GA4 | tutorials

How to fix the major GA4 BigQuery export misattribution (part 2: join 'gclid' parameter with Google Ads data transfer and get your campaign data right)

This tutorial will focus on how to 'repair' your source, medium AND campaign fields, by extracting the gclid parameter for every session where it is available, then join it with campaign data from the Google Ads data transfer in BigQuery.

In part 1 on how to deal with the major GA4 attribution bug, we proposed a solution to 'simply' overwrite the source / medium traffic acquisition fields to google / cpc when a gclid parameter is available in a page url during a session. For aggregated reports this could be a suitable workaround, but a lot of marketing professionals need more detailed reporting, especially on campaign level.

This tutorial will focus on another workaround: one that will enable you to 'repair' your source, medium AND campaign fields, by extracting the gclid parameter for every session where it is available, then join it with campaign data from the Google Ads data transfer in BigQuery, and finally retrieve the campaign name (and other information), session by session.

Requirements

If you haven't set up your Google Ads Data Transfer to BigQuery yet: here is a step-by-step instruction.

Also make sure to read part 1 before you proceed.