Adjust tCPA and Budget based on business rules

The script adjusts the target Cost Per Acquisition (tCPA) and daily budget of Google PPC campaigns labeled as 'Mature' based on their Return on Ad Spend (ROAS) over the previous 14 days.

What can I do with this?

Ensure your campaign KPIs are aligned with desired ROAS and your campaigns aren't changing so often as to be inconsistent

How it works

  • The script defines the criteria for campaign strategy target and daily budget adjustments.
  • It assigns column parameters for the input data and creates temporary columns to store new values for the tCPA and budget adjustments.
  • It checks if the tCPA or Daily Budget has been adjusted in the last 14 days and separates those that have been recently changed from those that haven't.
  • It will only update those that haven't been changed in the last 14 days. 


  • Users need to have defined target ROAS for each campaign 


  • See the code below for the required columns in the report


  • You can customize minimum and maximum ROAS and the amount of the adjustment amount the system should make to tCPA and daily budget



Written by Wes MacLaggan

Last published at: June 3rd, 2024