I originally wrote this article for the unnest insights blog.

We’ve all been there. You’ve convinced your dear clients / managers / colleagues / Head of Digital Disruptions and Artificial Intelligence that they should trust us to pour their raw GA data into BigQuery, for the 327 reasons listed all over the internet (sampling, data retention, the secret pact between GA’s UX designer and Kim Jong-un…).

You’ve shown them that, thanks to your encyclopaedic knowledge of SQL, you’ll be able to recreate everything UA (GA3) used to do — and much more besides. Finally, you’ve passionately explained how they are about to enter the wonderful GCP ecosystem, with its incredible Cloud Functions, delightful Cloud Run, and perilous Kubernetes Engine (I lost a bet a few years ago and now have to write “Kubernetes” at least once per article; long story).

IN SHORT. You’ve done your consulting job, the client is convinced, and all that’s left is to press the magic button.

And that’s when the awkward question lands: “All right, clever clogs, but how much is this little operation actually going to cost?”

Until recently, my answer was basically: “Relax, mate. Even with several million events a month, it’ll cost you roughly the price of a kebab — and not even the meal deal with garlic sauce.” I wasn’t saying that out of intellectual laziness (or kebab-induced hunger), but simply because it is, factually, true. If you collect fewer than 20 million events a month, the aforementioned kebab is about the most you’ll need to worry about for at least the first year.

Still, in the name of professionalism — and because I know that, deep down, some of you are absolute psychopaths looking for any excuse not to learn the three extremely basic SQL concepts BigQuery asks of you; yes, I know where you live — I’m going to see this through. Here is a rigorous and exhaustive method for helping your internal controlling department choose between activating BigQuery data and buying a new carpet for the break room at your Montreuil office.

Storage costs

First, take a quick look at the BigQuery pricing documentation, which explains all this wizardry, although not always in the most beginner-friendly way.

For anyone who doesn’t already know, you pay for BigQuery in two ways. The first is the volume of data you store: the more data you keep, the more you pay. A bit like renting a storage unit.

For storage, the Europe data centre rate is $0.02 per GB. The first 10 GB are free, and the price drops to $0.01 per GB per month after 90 days for data that hasn’t been modified.

That’s all very nice, you may say, but it doesn’t help much because in this business we talk in hits, certainly not gigabytes. As a broad rule of thumb, we generally assume that one million rows equals one GB of data.

To check that — because you can never be too careful — we can look at the Google Merchandise Store demo table. It contains 4.3 million rows and weighs in at 3.34 GB, which gives us 1.2 million rows per GB with a quick bit of cross-multiplication.

For fun, I ran a similar query on an implementation where I store a large number of custom parameters and therefore nested fields (plus some e-commerce, so even more nesting). The result was comparable: 611K events for 500 MB, or 1.22 rather than 1.28. Clearly the same order of magnitude.

So let’s use a deliberately very cautious assumption — remember, we’re talking to financial controllers here, people who are fundamentally a little stern — and say that one GB of data equals 1.4 million collected events, and therefore rows.

The quick calculation: Take a website collecting 10 million events per month. After one year, its table will contain 120 million rows. Remove the first 10 GB, which are free, and you'll be paying for 110 million rows — or, using our pessimistic rule of thumb, 78 GB of data.

That gives us 97 cents per month after one year. Yes, my brain froze the first time I did this calculation too. I thought that even if I’d dropped a zero, it was still absurdly cheap. And yet the maths checks out (Kevin).

Using the ACPM rankings as a reference, Le Figaro recorded roughly 600 million page views at the latest count. If we’re generous and very loosely round that up to one billion events per month, it would “only” cost €150 per month after a year. That amount is certainly not insignificant, but we’re talking about one of the highest-traffic websites in the country.

Query costs

This is where things can get a little trickier and where you may actually need to pay some attention, because you’re charged whenever you run a query.

The rate varies depending on the data centre hosting your data, from $5 to $8 per queried TB, with the first TB free. Let’s use the $5 rate for the European data centre.

Back to our website collecting 10 million events per month, which still has 78 GB of data after one year. If I behave like a little rascal and start firing SELECT * queries at the table, each query costs 0.078 × $5, or $0.39. But I can run that query a little over 12 times “for free”; I only start paying once I’ve crossed the one-terabyte threshold.

Query costs can therefore become a bit of an issue if you start doing absolutely anything, so a quick reminder never hurts:

  • Always work on a very short analysis period before widening your scope.
  • If dashboards or any other automated jobs are likely to repeatedly slam into your full table over long periods, consider buffer solutions such as materialised views.
  • Work with your data engineers. They know about mysterious things called “dbt” and “Dataform” that can save you from this kind of unpleasant surprise.

The sky is the limit

Now, yes, let’s address the elephant in the room: like a respectable dealer operating from the ground floor of a tower block, Google gives you the first hit for free and starts charging once you’re hooked. If you collect more than one million hits per day, you’ll have to move up to GA4 360.

The question burning your lips is obviously, “Yes, fine, but HOW MUCH, mate?” While GA 360 pricing may be the best-hidden information on the entire internet, informed circles speak of a package somewhere around 50,000 eurodollars per year.

If you’re flirting dangerously with the one-million limit, there are of course a few roguish tactics for avoiding or delaying the bill: disabling enhanced measurement, removing events that aren’t especially useful, or — if you’re a true analytics adventurer — sharding streams across multiple sites.

In principle, you now have absolutely no excuse not to export your GA4 data to BigQuery. And the next person I catch red-handed on LinkedIn saying “GA4 bad, boo, I don’t have landing pages” gets their kneecaps smashed gets sold a Piwik PRO consulting engagement.