CPC bucket and heatmap script

CPC bucket and heatmap script

Find the CPC level where your Google Ads campaigns stop being profitable.

This script looks at your campaign performance by hour and day of the week, grouping clicks into CPC "buckets" (for example €0–€1, €1–€2 and so on) so you can see exactly where your account stops being profitable. Everything is written to a ready-to-use Google Spreadsheet.

What you will see in the spreadsheet

  • CPC Buckets overview: per CPC range, clicks, cost, conversions, conversion value, conversion rate, cost per conversion, conversion value vs cost and cumulative metrics as CPC goes up. This shows which CPC ranges are still profitable, where results turn unprofitable and the best balance between volume and profit.
  • CPC Heatmap (by day and hour): a visual heatmap of average CPC per day and hour, so you can spot the most expensive and cheapest times to run ads.
  • CPA Heatmap (by day and hour): the same view for average cost per conversion, showing when conversions are most expensive or most efficient.

How this helps you optimize CPC

The goal is to help you set a realistic max CPC per campaign. The data shows exactly where your account switches from profitable to unprofitable, and the trade-off between a lower CPC with higher profit per conversion versus a higher CPC with more volume but lower or negative profit. Lowering your max CPC often reduces volume, but can raise overall profit by stopping you from overpaying for clicks.

Best practices

  • Use enough days of data so bucket and heatmap views are reliable, not based on a few clicks.
  • Look at both CPC and CPA. Cheap clicks are not always good if CPA is very high.
  • Don't set your max CPC too tight after one run. Test, then check the output again and adjust.
  • Use the day/hour heatmaps to align bid strategies or schedules with your most profitable times.