Skip to content

Instantly share code, notes, and snippets.

View adhummer's full-sized avatar

strayr adhummer

View GitHub Profile
var workingDateRange = "LAST_14_DAYS";
function main() {
lowerBidsToTopKeywords();
raiseBidsToMidPositionKeywords();
raiseBidsToLowPositionKeywords();
}
// EMAIL FIELDS
var _mailto = 'YOUR_EMAIL';
var _subject = 'Account Review Needed - ';
var _htmlBody = '<h1>Account Review Required</h1>';
var _isEmailRequired = false;
//PARAMETERS CHECKED
var _impressionsTreshold = 100;
var _clickTreshold = 10;
var _conversionTreshold = 2;
// EMAIL FIELDS
var _mailto = 'YOUR_EMAIL';
var _subject = 'Account Review Needed - ';
var _htmlBody = '<h1>Account Review Required</h1>';
var _isEmailRequired = false;
//PARAMETERS CHECKED
var _impressionsTreshold = 100;
var _clickTreshold = 10;
var _conversionTreshold = 2;
//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();
// Comma-separated list of recipients. Comment out to not send any emails.
var RECIPIENT_EMAIL = 'YOUR_EMAIL';
// URL of the default spreadsheet template. This should be a copy of http://goo.gl/pxaZio
var SPREADSHEET_URL = 'SPREADSHEET_URL';
/**
* This script computes an Ad performance report
* and outputs it to a Google spreadsheet
*/