How To Build a Marketing State Machine to Optimize Your Funnels

Using a new model to figure out what works

Fu Fei
Fu Fei
Jan 13 · 7 min read
Photo by Austin Distel on Unsplash

The funnel was first conceptualised in 1898. (Yes, more than a century ago).

It models a theoretical customer journey towards their purchasing decisions and the process is summarised by

  • Awareness
  • Interest
  • Desire
  • Action

This model has been revisited and revised numerous times by marketers and consultants to represent newer concepts like lead management and conversion rate optimisations.

So much so that we have become “funnel-obsessed”.

There are tons of posts about how the “funnel is dead” or that it is so “2000s”.

I’m not a marketing guru so I appreciate what the mental model allows us to grasp.

If it is so broken, why has it been kept around for so long?

We know that the customer journey is much more complex than a simple funnel. But, they do have the benefits of being:

  • Easy to understand
  • Easy to quantify

Marketers have an insanely difficult job of trying to quantify psychological urges.

It isn’t exactly mind control. It is more like trying to measure mind control.

The mental model of funnels is just that.

A mental model.

It’s meant to simply for the sake of understanding.

Now that we understand the benefits of the funnel, we can start examining where it falls short and how more modern customer journeys can be better mapped.

Where Do Funnels Fall Short?

The most common complaint:

It doesn’t fully encapsulate the customer journey.

When you pick apart some of the nuance here, there are actually five things to note…

  1. Cross funnel journeys
  2. Non-linear journeys
  3. Time boundaries and snapshots
  4. Different awareness states
  5. Repeat purchasers

For the next section, I will be borrowing concepts from different marketing experts and explaining how different emergent solutions attempt to address the shortcomings of the marketing funnel.

It should come as no surprise that most customers don’t make a purchase the first time they come into contact with your company.

They run through loads more touchpoints before they ever even considering a purchase.

For this, we invented “attribution modelling”.

Attribution modelling attempts to score each touchpoint based on their influence towards the final purchasing decision.

Another observed behaviour (thanks to web analytics) is that customers don’t always move across the funnel as expected.

Sometimes they remain at the same stage for months before purchasing. (Sometimes they move backwards.)

In order to address this, we invented “retargeting”.

Retargeting attempts to further nurture customers who have already come into contact with your digital assets with more adverts in order to push them along the funnel.

Another shortcoming of the marketing funnel is the static nature of its visualisation.

It lacks a certain time element in explaining how long one set of customers remain at a certain stage and how quickly they move along to the next stage of the funnel.

In order to address this, we invented “cohort analysis”.

Cohort analytics allows us a snapshot view of how a subset of users are behaving across a time-bound period.

Even if your target market is all 7 billion people on the planet. Not everyone has heard of the problem you solve.

It depends on their starting point. Customers are always one of these three states:

  1. Unaware of both the problem and solution
  2. Aware of the problem but NOT the solution
  3. Aware of the problem and possible solutions

This awareness state differs slightly depending on whether they’ve already made a purchasing decision.

There isn’t really a good solution measuring this at the moment.

The best we have at the moment is “interaction and engagement metrics”.

Interaction and engagement metrics on Facebook and Google (including Instagram and Youtube) provide us with data on how viewers are interacting with the ads and content placed on their respective platforms.

As we move from a one-time purchases to one where purchase relationships are nurtured for a longer period of time, marketers are starting to track the lifetime value of customers.

For this, we turn to Brian Halligan (CEO of Hubspot), who boldly claimed it was time to retire the funnel and welcome the flywheel.

The flywheel focuses on measuring the ROI of nurturing customer relationships.

Customer Journeys & State Machines

If we were to combine all the lessons from above, marketing starts to look really complicated.

But that’s what we are going for.

We want a visualisation that attempts to encapsulate the entire customer journey.

For that, I think the mathematical model of state machines are perfect.

State Machines

State machines are a mathematical model of computation. They are abstractions that can be in exactly one of a finite number of states at any given time.

Simple example:

Complex example:

For marketing, the entire diagram could look something like this:

The diagram below depicts how a marketing state machine would look:


  • Customer states are in the more rectangular looking boxes while
  • State changes are in the circles

Now, let’s add some complexity.

We know customers don’t always smoothly transition to the next stage based on one prompt.

Sometimes, we need more than one state changer.

If we were to spend some time labelling these state changers, it would look something like this.

This might not fully encapsulate every single state changer, but you get the point.

Extra Notes:
SEO is only added later because you don’t search for problems unless you are aware of them.
- Email is only added later because you can’t catch it if they haven’t searched for solutions.


This would be what many refer to as the “top of the funnel”.

This would be the “middle of the funnel”.

This would be the “bottom of the funnel”.

This could also be considered the “bottom of the funnel” but rather than conversions, many track the engagement of shoppers here.

State Changers

At this point, the entire state machine looks like a large funnel (that would be an oversimplification, but still correct).

Here is where it gets complicated.

You can actually break down individual state changers to the different stages of a marketing campaign that they represent to observe the performance of each stage at any point in time.

Depending on the reliability of your attribution data, you can even track how audiences may be moving in between states.


The technology and tools in digital marketing are rapidly evolving. Eventually, it will catch up to our needs.

The need for more granular analysis. The need for mapping the entire experience. The need for understanding non-linear journeys.

The need for a Marketing State Machine.

Better Marketing

Advice & case studies

Thanks to Niklas Göke

Fu Fei

Written by

Fu Fei

Read & Write about E-commerce, SaaS, Marketing & Data. Working on Product Lens ( at the moment.

Better Marketing

Advice & case studies

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade