Monthly Budget Cap via gSheet

This script pauses campaigns in Strategies if they exceed a monthly budget cap as defined in a Google Sheets document. It is an alternate approach to setting the budget cap with a Marin Dimension.

What can I do with this?

This script gives you greater control of monthly spending than publisher tools allow, eliminating the possibility of overspending and client credits.

How it works

This script compares the aggregate MTD spend for the Strategy and if it's over monthly target it pauses the campaign and outputs the pause date to a dimension.


  • Ensure you have intraday-data turned on. Contact your Marin team for help.
  • Google Sheet linked as Reference Data in the script setup with Strategy Name, Monthly Budget 
  • Select This Month as the date range with Include Today's Date checked
  • Schedule the report to run every two hours. 




Written by Wes MacLaggan

Last published at: March 25th, 2024