Join 3,200+ other professionals and receive a monthly newsletter packed with GA4 & BigQuery news, tips & tricks
Already have an account? Sign inAs a Google Analytics user you are probably quite attached to the default reports in the user interface of Google Analytics 4. It can be hard to make sense of the data in the BigQuery export tables.
Let me enable you to replicate the report you're familiar with. I'll try to keep it as basic as possible here.
User acquisition report
In the Life cycle | Acquisition | User acquisition report you'll find a table with data about acquisition at user level (source, medium, campaign) and some engagement metrics. We will try to replicate this table with the query below.
Good to know
The main query contains all primary dimensions that are available in the BigQuery export. By default only the first one is selected, the other dimensions are 'hidden' by a single line comment. Remove the -- part to select these dimensions. Don't forget to adjust the group by clause by removing the corresponding -- as well.
It is expected that the results will not match (exactly) with your reports in the Google Analytics 4 user interface. Don't worry about it, it can occur for a variety of reasons.