Hello,
I am developing a Google Ads script to export auction insights data from search campaigns directly into a Google Sheet. I am encountering an issue and would appreciate some guidance.
My objective is to automate the reporting of auction insights metrics.
Could you please advise on the following:
A basic example of a GAQL query to retrieve this data would be extremely helpful.
Thank you for your assistance.
Note that the auction insight metrics are not publicly available and only for the allowlisted accounts. For example, below metrics :
You may try the sample code :
function main () {
var spreadsheet = SpreadsheetApp.openByUrl("ADD_YOUR_SPREADSHEET_URL");
var sheet = spreadsheet.getSheetByName("ADD_YOUR_SHEET_NAME");
const query = `SELECT campaign.id, campaign.name, campaign.status, campaign.advertising_channel_type, metrics.auction_insight_search_impression_share, segments.auction_insight_domain FROM campaign`;
console.log("GAQL query to fetch the auction insight search impression share and domain")
const report = AdsApp.report(query);
const rows = report.rows();
while (rows.hasNext()) {
let row = rows.next();
console.log(row);
}
report.exportToSheet(spreadsheet.getActiveSheet());
console.log("Data exported successfully");
}
![]() |
Google Ads Scripts Team |
[2025-10-30 15:23:36Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vSDed:ref" (ADR-00337725)
![]() |
Google Ads Scripts Team |
[2025-10-31 06:36:46Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vSDed:ref" (ADR-00337725)
Hi,
The best way to get more information about your issue is the Google Ads Help Center. You can also utilize the Google Ads Communities for additional support.
Kindly note that this support channel specializes in Google Ads Scripts related concerns and technical implementations only and issues related to the allowlisting status are not in our scope.![]() |
Google Ads Scripts Team |
[2025-11-12 04:14:55Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vSDed:ref" (ADR-00337725)