AdsApp.​ReportColumnHeader

  • Represents a column header within a report, providing methods to retrieve its name for bulk uploads and report queries.

  • getBulkUploadColumnName() returns the column header name for use in bulk uploads, mirroring the format seen in report downloads and bulk uploads from the Google Ads UI.

  • getReportColumnName() returns the column header name used within report queries, specifically for selectable columns when using AdsApp.report().

  • When creating a CsvUpload with a Report, ensure to use getBulkUploadColumnName() for column creation.

  • Note that getBulkUploadColumnName() will result in an error if the query employs GAQL instead of AWQL.

Represents a column header of a report.

Methods:

MemberTypeDescription
getBulkUploadColumnName() String Returns the name of the column header to use in bulk uploads.
getReportColumnName() String Returns the name of the column header as used in report queries.

getBulkUploadColumnName()

Returns the name of the column header to use in bulk uploads.

These names are the columns as they would appear in a report download from the Google Ads UI, and as recognized in bulk uploads.

NOTE: If you're generating a CsvUpload with Report, make sure to use this method in creation. Typical usage:

  var upload = AdsApp.bulkUploads().newCsvUpload([
      report.getColumnHeader("AdGroupId").getBulkUploadColumnName(),
      report.getColumnHeader("AdGroupName").getBulkUploadColumnName()
      ...]);

This method will return an error if the query uses GAQL rather than AWQL.

Return values:

TypeDescription
String The name of the column header to use in bulk uploads.

getReportColumnName()

Returns the name of the column header as used in report queries.

These names are the selectable columns in the query of AdsApp.report(String, Object).

Return values:

TypeDescription
String The name of the column header as used in report queries.