This is the legacy documentation for Google Ads scripts. Go to the current docs.

Accounts

Stay organized with collections Save and categorize content based on your preferences.

Get details on the current account

function getCurrentAccountDetails() {
  var currentAccount = AdsApp.currentAccount();
  Logger.log('Customer ID: ' + currentAccount.getCustomerId() +
      ', Currency Code: ' + currentAccount.getCurrencyCode() +
      ', Timezone: ' + currentAccount.getTimeZone());
  var stats = currentAccount.getStatsFor('LAST_MONTH');
  Logger.log(stats.getClicks() + ' clicks, ' +
    stats.getImpressions() + ' impressions last month');
}