Many analytics teams fall back on sessions and last-click attribution even when the full GA4 event export sits in BigQuery. Those aggregated, often misleading metrics use a fraction of what the data can show, and they prevent the user journey from being modelled properly.
A customer state machine shifts the focus from logging discrete events to modelling transitions and accumulated properties over time. A user moves from new_user to browsing, engaged_shopper and eventually paying_customer, driven by a sequence of actions and observations. Building this requires joining GA4 export events with CRM data and internal system records, which also gives a more complete view of cross-platform and cross-device behaviour. user_pseudo_id is scoped to a browser or app instance, so a stable identifier such as user_id or a CRM key should anchor the model wherever it is available.
dbt is the natural tool for this; a model of this kind cannot be assembled through a reporting interface. Each state is defined as an explicit, documented rule over events and customer attributes. Events are ordered by event_timestamp, each user's state is evaluated over time, and LAG() keeps only the rows where the state changes. The output is a transition table with one row per change: the user key, the previous state, the new state and when the change happened. From it, dbt can derive customer profiles and features that support analysis of retention, lifetime value and feature adoption beyond what standard aggregated reports allow.
Ownership matters as well. Relying on third-party cookies or proprietary platform algorithms is a long-term risk. Collecting first-party data into the organisation's own environment, for example through a privacy-first tool such as Robin Signals, and modelling it carefully in BigQuery gives the business control over its customer data and its compliance position.
A well-built state machine supports rigorous causal inference for marketing experiments, accurate predictive models for churn or conversion, and individual-level personalisation. It moves analysis from 'what happened?' to 'why did it happen, and what is likely to happen next?'
Viktor Kvant
Senior Web Analyst specialising in data ownership, advanced tracking implementations, and translating data into strategic business value.
Connect on LinkedIn