Auction Insight Metrics Script Error

90 views
Skip to first unread message

Pam Reichhartinger

unread,
Jun 21, 2022, 7:45:42 AM6/21/22
to Google Ads Scripts Forum
Hey,

I am looking to retrieve the following campaign data using a script:

Campaign ID
Campaign Name
Auction Domain
Auction Impression Share

The following is the code in use:

function main() {
 
 
   var query = `
   SELECT campaign.id,
               campaign.name,
               segments.auction_insight_domain,
               metrics.auction_insight_search_impression_share
        FROM campaign
        WHERE segments.date = '2022-06-10'
          AND campaign.advertising_channel_type = 'SEARCH'
          AND campaign.status = 'ENABLED'
        ORDER BY campaign.id ASC
   `;
 
  var report = AdsApp.report(query);
 
   var rows = report.rows();
 
  while (rows.hasNext()) {
    var row = rows.next();
   
    Logger.log(row);
  }
   
   
I have verified the script using the query validator:
https://developers.google.com/google-ads/api/fields/v11/query_validator

Unfortunately when we run the script we are getting the following error (using the New Script Experience):

15/06/2022 09:51:20    Exception: Call to GoogleAdsService.Search failed: Unrecognized fields in the query: 'segments.auction_insight_domain', 'metrics.auction_insight_search_impression_share'.
    at adsapp_compiled:18068:138
    at adsapp_compiled:18079:9
    at ra (adsapp_compiled:227:15)
    at Object.search (adsapp_compiled:235:20)
    at bI.search (adsapp_compiled:18194:36)
    at LH.search (adsapp_compiled:17771:19)
    at MH.search (adsapp_compiled:17866:20)
    at TH.search (adsapp_compiled:17958:19)
    at ed (adsapp_compiled:1042:15)
    at ed.next (<anonymous>)
   
   
Can you please help me get the auction insights metrics?

Thanks,

Google Ads Scripts Forum Advisor

unread,
Jun 22, 2022, 1:53:40 AM6/22/22
to adwords...@googlegroups.com

Hello Pam,

Thank you for contacting us. I'm James from the Google Ads scripts support team. Allow me to assist you.

Can you please provide us with the following information below so that we can further check?

  • Google Ads account ID / CID
  • Script name

Regards,

Google Logo
James Howell
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2byZY0:ref
Reply all
Reply to author
Forward
0 new messages