How to Calculate Your Cost Metrics?

A common question is how to work with calculated metrics such as CPM, CPC, CTR, and others.
This happens because, when you bring data from your accounts into Stract and select fields like CTR or CPC, you’ll get something like this table:

When you connect your table to Data Studio and use the CTR and CPM fields, you’ll notice that the data doesn’t match the manager and the real value of these metrics for the period.
This is due to the aggregation that Data Studio applies to composite metrics:

Even if you change the aggregation to “average” instead of “sum,” Data Studio will still generate different results:

In some cases, the difference might be small, but in general, it’s recommended to work with the calculation inside Data Studio.

To create your calculated metric in Data Studio:

Access your Google Data Studio report and create a custom field:

To calculate the cost per any desired metric, you’ll use a formula similar to this:

SUM(Cost) / SUM(Metric)

The SUM represents the total cost divided by the selected metric. Using Stract’s fields, it would look like this:

With that, you just need to create the calculated fields for each metric, such as Cost/Conversion, Conversion Rate, etc.
One note: the CTR sent by the Facebook Ads API needs to be divided by 100.
If the data still shows discrepancies with the Manager, it’s worth checking the support articles:

Invite & Earn

X
Signup to start sharing your link
Signup
background banner image
loading gif

Available Coupon

X