AdWords API Scripts - Tracking campaign expenditure with Google Sheets

31 views
Skip to first unread message

majstorog...@gmail.com

unread,
Apr 7, 2016, 8:42:56 AM4/7/16
to AdWords API Forum
Hi all,

I am trying to do some basic scripting here, I wish to track daily expenditure for a subset of my AdWords campaigns and log this into a Google Spreadsheet. From there, I will set up budget monitoring which will update daily so i can adjust (for overspend/underspend). I am using a script created by Google Adwords team which I am trying to modify bud here's the problem:

>> Where can I find the reference to field names in the API? ('Clicks', 'Impressions', 'AveragePosition', ...)

Here is the part of the script which is bugging me: 

while (date.getTime() <= yesterday.getTime()) {
    var row = getReportRowForDate(date);
    rows.push([
      new Date(date), 
      row['Cost'], 
      row['AverageCpc'], 
      row['Ctr'],
      row['AveragePosition'], 
      row['Impressions'], 
      row['Clicks']
      ]);
    spreadsheet.getRangeByName('last_check').setValue(date);
    date.setDate(date.getDate() + 1);
  }

I am interested in some of these fields but I cant some other as well.

Many thanks!

Umesh Dengale

unread,
Apr 7, 2016, 1:01:53 PM4/7/16
to AdWords API Forum
Hello,

We support AdWords API related cases. Are using AdWords Scripts? If yes then please post your question in AdWords Script forum. If you are using AdWords API, then you could use the CAMPAIGN_PERFORMANCE_REPORT to get the stats(Impressions, Cost, Clicks etc.) related to the campaigns.

Thanks,
Umesh, AdWords API Team.  
Reply all
Reply to author
Forward
0 new messages