If you’ve ever tried to calculate CAC (Customer Acquisition Cost) using GA4 data, you’ve probably asked yourself: «»Where exactly are the buyers, costs, and common sense in all this?"

Spoiler: you won’t find them in the GA4 interface. But with BigQuery (and a bit of SQL + patience), you can piece it all together.

What is CAC?

CAC = Acquisition Costs / Number of New Customers

Sounds simple enough. But here’s the real challenge: Where do you get the “costs”? And who counts as a “new” customer?

Let’s break it down.

• Costs usually come from external sources — ad platforms, your CRM, or Google Ads Export. Ideally, you import these into BigQuery and join them by date and/or source.

• New customers are those who made a purchase (or subscribed, or converted - depending on your definition) for the first time.

How to calculate CAC with GA4 + BigQuery:


1. Build the cohort. Select users whose ga_session_number = 1 within your target date range. Truncate event_timestamp to the month — that month is the user’s cohort_month.
2. Identify buyers. Join those cohort users back to events where event_name = 'purchase'. It doesn’t matter when the purchase happened — as long as the user belongs to the cohort, they count.
3. Count customers. Group by cohort_month and count distinct user_pseudo_id to get the number of customers per cohort month.
4. Aggregate spend. Sum your ad spend by month from a separate table (e.g. ad_spend).
5. Calculate CAC. Join spend and customers on month and compute:


Along the way, you’ll likely run into messy UTM tags, offline conversions, and the classic “user who purchased but not from the tracked session” issue. But all of that is solvable.

Takeaway:

GA4 is about user behavior. BigQuery — paired with Excel and your ad spend — is where the real financial picture comes into focus.

If you want a clear view of what one customer actually costs you, it’s time to bring everything into one place and take control of your CAC.
Because no one wants to pay $50 to acquire a customer who only brings in $12.

Want to get all my top Linkedin content? I regularly upload it to one Notion doc.

Go here to download it for FREE.