How to calculate cost-related metrics on Google Data Studio

Marketing reporting made easy: Automated, code-free, and visually intuitive.

14-day free trial

We'll cover

If you’re using our Facebook Ads connector for Google Data Studio or similar connectors, you may notice that we don’t bring all the cost-related metrics.

We bring, for instance, Cost per Click, but not Cost per Purchase, or Cost per Comment or Cost per Added Cart. Why is that?

We’re already pulling over 600 fields — it may be overwhelming for many users.

We also want to encourage users to leverage the power of the custom formulas Google Data Studio offers. Just think of doing Google Sheets operations but on Data Studio.

How to Calculate your Cost-metrics?

Go to your Google Data Studio report and create a custom field:

Google Data Studio report

To calculate the cost per any metric you want, use one of these formulas:

  • (Cost)/(Metric)
  • SUM (Cost)/ SUM (Metric)

Depending on the structure of the app or connector, one formula may work better than the other one. I encourage you to try both to see which one or if both calculate correctly.

Cost metrics names can vary between different connectors. Cost on Facebook Ads is labeled as “Amount spent“; on Google Ads it’s labeled as “Cost“.

Here’s a real example for calculating the Cost per Purchase on Facebook Ads.

If you want to calculate cost on other metrics like Cost per Landing Page View, Engagement, or Action, use the same formula and replace the value in the denominator.