Last active
June 4, 2016 01:22
-
-
Save daniel-c05/0709d4c44eb8e97c9764 to your computer and use it in GitHub Desktop.
AdWords Scripts - Minimize Overdelivery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Edit this based on the max amount you want to spend on a given day. | |
var maxSpend = 1000; | |
function main () { | |
var currentAccount = AdWordsApp.currentAccount(); | |
var stats = currentAccount.getStatsFor("TODAY"); | |
var cost = stats.getCost(); | |
Logger.log("Account has spent " + cost + " so far."); | |
if (cost > maxSpend) { | |
campaign.pause(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment