Posts tagged with report

I've been trying to run some sample code from the official docs.

But I get an error: Invalid reporting query: ACCOUNT_PERFORMANCE_REPORT. (file Code.gs, line 18)

The official sample from the official doc: https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_report

My code:

function main() {   var spreadsheet = SpreadsheetApp.create("Report output");    //var report = AdsApp.report("SELECT Id, PolicySummary FROM ACCOUNT_PERFORMANCE_REPORT DURING LAST_30_DAYS");   var report = AdsApp.report("SELECT Clicks, Impressions, AverageCpc, HourOfDay FROM ACCOUNT_PERFORMANCE_REPORT DURING LAST_MONTH");    report.exportToSheet(spreadsheet.getActiveSheet());    Logger.log("Report available at " + spreadsheet.getUrl()); } 

I want to create such a table:

list of all search keywords of a specific advertiser. And for each column the metric of "absolute top page rate" for a different advertiser.

I have tried to start with a simpler table of keywords x one advertiser rates, but I get an error from data studio.

How can I create the desired table?

Thanks

message: "absolute_top_of_page_rate is prohibited with entities: KeywordGroup. Measures should have explicit segmentation fields if prohibited entities are selected." trigger { string_value: "absolute_top_of_page_rate" } origin: INVALID_REQUEST