AdsApp.​Report

  • The Google Ads report object represents a report generated by Google Ads.

  • The exportToSheet() method exports the report's content into a Google Sheet.

  • The rows() method returns an iterator to loop through the rows of the report.

Represents a Google Ads report.

Methods:

Member Type Description
void Exports the content of the report into a Sheet .
AdsApp.ReportRowIterator Returns an iterator over the rows of the report.

exportToSheet(sheet)

Exports the content of the report into a Sheet .

Typical usage:

  
 var 
  
 spreadsheet 
  
 = 
  
 SpreadsheetApp 
 . 
 create 
 ( 
 "Report output" 
 ); 
  
 var 
  
 report 
  
 = 
  
 AdsApp 
 . 
 report 
 ( 
 "SELECT metrics.clicks, " 
  
 + 
  
 "metrics.impressions, metrics.average_cpc, segments.hour " 
  
 + 
  
 "FROM customer " 
  
 + 
  
 "WHERE segments.date DURING LAST_MONTH" 
 ); 
  
 report 
 . 
 exportToSheet 
 ( 
 spreadsheet 
 . 
 getActiveSheet 
 ()); 
  
 Logger 
 . 
 log 
 ( 
 "Report available at " 
  
 + 
  
 spreadsheet 
 . 
 getUrl 
 ()); 

Returns nothing.

Arguments:

Name Type Description
sheet
SpreadsheetApp.Sheet The sheet in a Google Spreadsheet to export the report to.

rows()

Returns an iterator over the rows of the report.

Return values:

Type Description
AdsApp.ReportRowIterator An iterator over the rows of the report.
Design a Mobile Site
View Site in Mobile | Classic
Share by: