Skip to content

CONFIG Reference

John Williams edited this page Mar 13, 2026 · 1 revision

CONFIG Reference

Every script in this collection uses a CONFIG object at the top for user-configurable settings. Here are the most common fields you'll encounter.

Universal Fields

const CONFIG = {
  // Email recipient for reports/alerts
  emailAddress: 'you@company.com',

  // Google Sheets URL for input/output
  SPREADSHEET_URL: 'https://docs.google.com/spreadsheets/d/YOUR_ID/edit',

  // Date range for analysis
  dateRange: 'LAST_30_DAYS',  // or 'LAST_7_DAYS', 'THIS_MONTH', custom range

  // Dry run mode — preview changes without applying
  dryRun: true,  // Set to false for production
};

Date Range Options

Google Ads Scripts support these predefined ranges:

  • TODAY
  • YESTERDAY
  • LAST_7_DAYS
  • LAST_14_DAYS
  • LAST_30_DAYS
  • THIS_MONTH
  • LAST_MONTH
  • THIS_QUARTER (not available in all contexts)

For custom ranges, use YYYYMMDD,YYYYMMDD format.

Bidding Script Fields

CONFIG = {
  targetImpressionShare: 0.85,   // Target 85% impression share
  maxBidLimit: 15.00,            // Never bid above $15
  minBidLimit: 0.50,             // Never bid below $0.50
  bidAdjustmentPercent: 0.10,    // 10% bid adjustment per cycle
  conversionRateThreshold: 0.01, // Skip keywords below 1% CVR
};

Monitoring Script Fields

CONFIG = {
  alertThresholds: {
    impressionDropPercent: 30,   // Alert if impressions drop 30%+
    clickDropPercent: 25,        // Alert if clicks drop 25%+
    ctrDropPercent: 20,          // Alert if CTR drops 20%+
    spendIncreasePercent: 50,    // Alert if spend increases 50%+
  },
  lookbackWeeks: 4,              // Compare against 4-week average
  maxExecutionMinutes: 25,       // Stop before Google's 30min limit
};

Tips

  • Always start with dryRun: true and review logs before going live
  • Use LAST_30_DAYS for stable metrics; LAST_7_DAYS for trending
  • Set maxExecutionMinutes to 25 to avoid Google's 30-minute timeout

Clone this wiki locally