Account Summary Report - Parsing Error

41 views
Skip to first unread message

Sion Jones

unread,
Oct 12, 2021, 7:37:19 AM10/12/21
to Google Ads Scripts Forum
Hi all,

Not sure how, but I've come across this error:

"Parsing error. Please check your selector. (file Code.gs, line 243)"

function getReportRowForDuring(during) {
  var report = AdsApp.report(
      'SELECT ' +
          REPORT_FIELDS
              .map(function(field) {
                return field.columnName;
              })
              .join(',') +
          ' FROM ACCOUNT_PERFORMANCE_REPORT ' +
          'DURING ' + during,
      REPORTING_OPTIONS);
  return report.rows().next();
}


Not sure what's caused this as it passed the preview the other day, but now is showing this.


Google Ads Scripts Forum Advisor

unread,
Oct 12, 2021, 11:33:11 PM10/12/21
to adwords...@googlegroups.com
Hi Sion,

Thanks for reaching out. Harry here, from the Google Ads Scripts Team.

It's most likely that the your reporting query values are invalid. Kindly provide your Google Ads account ID, script's name and a shareable link to your spreadsheet if available so I can take a look closer at the issue you are encountering. You may send them here and take not of sensitive data or provide details privately via the reply to author option. Note that you may need to join the Google Group for you to use this option. If this option is not available at your end still, you may send it through our email (googleadsscr...@google.com) instead.

Looking forward to your reply.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2PIqu8:ref

Google Ads Scripts Forum Advisor

unread,
Oct 14, 2021, 12:22:50 AM10/14/21
to adwords...@googlegroups.com
Hi Sion,

Thanks for coming back with the requested details. The column names in the REPORT_FIELDS object on line 58 should match the names in the Account Performance Report and you can instead have another name for these columns in the displayName attributes as you need to. Kindly make changes to the columnName attributes based of the below and let me know how it goes.
  • Avg. CPC  >  AverageCpc
  • CTR  >  Ctr
  • Search Impr. share  >  SearchImpressionShare
  • Cost / conv.  >  CostPerConversion
  • Conv. rate  >  ConversionRate

Sion Jones

unread,
Oct 19, 2021, 4:21:36 AM10/19/21
to Google Ads Scripts Forum
Sorry for the delayed reply I did not notice you replied here.

I've made those changes but I'm still getting the same error

Google Ads Scripts Forum Advisor

unread,
Oct 20, 2021, 12:44:57 AM10/20/21
to adwords...@googlegroups.com
Hi Sion,

I work along with Harry. Allow me to assist you in this.

As per checking, it appears that you've updated the displayName instead of the columnName value which causes the error persists. Kindly update your reports fields with this:
var REPORT_FIELDS = [
   {columnName: 'Cost', displayName: 'Cost'},
   {columnName: 'AverageCpc', displayName: 'AverageCpc'},
   {columnName: 'Ctr', displayName: 'Ctr'},
   {columnName: 'Impressions', displayName: 'Impressions'},
   {columnName: 'Clicks', displayName: 'Clicks'},
   {columnName: 'Conversions', displayName: 'Conversions'},
   {columnName: 'SearchImpressionShare', displayName: 'SearchImpressionShare'},
   {columnName: 'CostPerConversion', displayName: 'CostPerConversion'},
   {columnName: 'ConversionRate', displayName: 'ConversionRate'},
 ];

Regards,
Google Logo
Teejay Wennie Pimentel
Google Ads Scripts Team
 

 

ref:_00D1U1174p._5004Q2PIqu8:ref

Sion Jones

unread,
Oct 20, 2021, 5:20:57 AM10/20/21
to Google Ads Scripts Forum
It's all good, I changed the columns in my report to match the ones you've set and it works fine now.

thanks for you help both

Reply all
Reply to author
Forward
0 new messages