AdWords scripts

Account

  1. Get details on the current account

Get details on the current account

function getCurrentAccountDetails() {
  var currentAccount = AdWordsApp.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');
}

Back to top

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.