dbt-ga4: the community standard for modelling the GA4 BigQuery export
A dbt package that turns the raw GA4 BigQuery export into report-ready models for sessions, users, ecommerce and attribution.
The Measurement Room
The community-gallery GTM template for Google Consent Mode, adjusting tag behaviour from the visitor's recorded consent state.
Google Consent Mode lets tags adjust behaviour, cookieless pings instead of full tags, for example, based on a visitor's recorded consent rather than firing or blocking wholesale. Wiring it correctly by hand is fiddly: default states, update events, and region-specific rules all have to line up before any tag fires. Simo Ahava's Consent Mode template packages that logic as a GTM tag, available in the Community Template Gallery.
Simo Ahava is one of the most cited educators in the tag-management field, and this template is about as close to a canonical Consent Mode implementation as exists outside Google's own documentation. It is installable straight from GTM's gallery rather than pasted in as custom HTML, which keeps the container easier to audit and maintain.
gcs and related consent parameters change correctly before and after consent.The template implements Consent Mode's mechanics correctly, but it does not decide your consent categories or legal basis for you, that mapping is still yours to get right, and a mismatch there will silently misclassify visitors regardless of how well the template runs. It also assumes a consent platform that writes a readable signal GTM can pick up, so it is not a complete solution without one.
More Like This
A dbt package that turns the raw GA4 BigQuery export into report-ready models for sessions, users, ecommerce and attribution.
Three foundation queries for the GA4 BigQuery export: the event_params unnesting pattern, daily users and sessions, and top pages by view, all with a date filter that controls scan cost.
Session-scoped source, medium and campaign reporting from the GA4 BigQuery export, aggregating sessions and conversions per channel, with an honest note on why it will not tie out to the GA4 UI.