Is there a way to track Search Volume in a specific Industry? I will use a Google Ads script:
var API_KEY = 'xx';
var SERVICE = AdsApp.ads();
SERVICE.getAuth().setApiKey(API_KEY);
function main() {
// Get the keywords in the account
var keywords = AdsApp.keywords().get();
var spreadsheet = SpreadsheetApp.create('Weekly Keyword Search Volume');
var sheet = spreadsheet.getActiveSheet();
// Add headers to the spreadsheet
sheet.appendRow(['Keyword', 'Week', 'Search Volume']);
// Loop through the keywords and get the search volume
while (keywords.hasNext()) {
var keyword = keywords.next();
var searchVolume = keyword.getSearchVolume();
var week = new Date().getWeek();
// Add the keyword, week, and search volume to the spreadsheet
sheet.appendRow([keyword.getText(), week, searchVolume]);
}
}
However, I'll get TypeError: SERVICE.getAuth is not a function (line 3). How to solve this?