Script to automatically update auction insight report on spreadsheet

196 views
Skip to first unread message

Bhawna Singh

unread,
Oct 9, 2024, 8:28:01 PM10/9/24
to Google Ads Scripts Forum
Hi,

I am looking for a script that can automatically provide me auction insight on spreadsheets for specific campaigns.

I have a base here:

function main() { var spreadsheetUrl = 'YOUR_GOOGLE_SHEET_URL_HERE'; var spreadsheet = SpreadsheetApp.openByUrl(spreadsheetUrl); var sheet = spreadsheet.getActiveSheet(); // Specify the name of the campaign you want to target var campaignName = 'YOUR_CAMPAIGN_NAME_HERE'; // Query to get auction insights report for last month var query = ` SELECT CampaignName, SearchImpressionShare, SearchOverlapRate, SearchPositionAboveRate, SearchTopOfPageRate FROM CAMPAIGN_PERFORMANCE_REPORT WHERE CampaignName = '${campaignName}' DURING LAST_MONTH `; // Fetch the report for the last month var report = AdsApp.report(query); // Parse the rows and append data to the Google Sheet var rows = report.rows(); while (rows.hasNext()) { var row = rows.next(); sheet.appendRow([ row['CampaignName'], row['SearchImpressionShare'], row['SearchOverlapRate'], row['SearchPositionAboveRate'], row['SearchTopOfPageRate'] ]); } }  


Google Ads Scripts Forum Advisor

unread,
Oct 10, 2024, 2:55:15 AM10/10/24
to adwords...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads Scripts support team.

Please note that reporting the auction insights metrics via the Google Ads Scripts is currently not supported. I would recommend that you follow our blog post for future updates.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGd94:ref" (ADR-00271224)

Thanks,
 
Google Logo Google Ads Scripts Team


Nils Rooijmans

unread,
Oct 10, 2024, 4:14:53 AM10/10/24
to Google Ads Scripts Forum
Unfortunately, the Google Ads report API doesn't allow us to access to auction insight data. There also is no other way for Google Ads script to access the data. 
The only thing you can do, is export the data from the Google Ads UI and then import them into Google Sheets where you can visualize them any way you want.

Here's an  example to get you started:
And a more advanced setup that automates this process:

Hope this helps,

Nils Rooijmans
https://nilsrooijmans.com
See my Google Ads Scripts FAQ to avoid the same mistakes I made: https://nilsrooijmans.com/google-ads-scripts-faq/

Mike Rhodes

unread,
Oct 14, 2024, 1:01:45 AM10/14/24
to Google Ads Scripts Forum
@bhawna

I recently created this - it's available for free.
A google sheet (just make a copy of the template)
That pulls in the data from your saved google sheets, cleans all the data & lets you chart it.

You still need to schedule the auction insights sheets to be downloaded to a google drive folder (eg daily or weekly)
but then this script/sheet does the rest.
enjoy.

https://docs.google.com/spreadsheets/d/1FL4EkKevjb9wSq3zgAn7nWh-QSeNnICg89dztGKkdhY/copy
Reply all
Reply to author
Forward
0 new messages