HomeFree toolsAccount snapshot
Google Ads script

Account snapshot (30 days)

Read-only. Logs 30-day performance per active campaign — impressions, clicks, cost and conversions, sorted by cost. A quick health check without opening the UI.

By the SEOZ team · Updated June 12, 2026

All scripts
Read-only
function main() {
  // Read-only: logs 30-day performance for each enabled campaign.
  var campaigns = AdsApp.campaigns()
    .withCondition('Status = ENABLED')
    .forDateRange('LAST_30_DAYS')
    .orderBy('Cost DESC')
    .get();

  Logger.log('Campaign | Impr | Clicks | Cost | Conv');
  while (campaigns.hasNext()) {
    var c = campaigns.next();
    var s = c.getStatsFor('LAST_30_DAYS');
    Logger.log(
      c.getName() + ' | ' + s.getImpressions() + ' | ' + s.getClicks() +
      ' | ' + s.getCost().toFixed(2) + ' | ' + s.getConversions()
    );
  }
}
How to run the script
  1. Google Ads → Tools → Bulk actions → Scripts.
  2. Click + and paste the code. Authorize when asked.
  3. Run a preview first and read the log.
  4. Schedule the script if you want it to run regularly.
SEOZ runs these checks for you — automatically, with alerts when something breaks.
Try the guided demo →More scripts