AdsApp.report() Not Returning Correct Campaign Labels

157 views
Skip to first unread message

John Maher

unread,
Dec 21, 2021, 2:06:30 AM12/21/21
to Google Ads Scripts Forum
When requesting a campaign report with AdsApp.report[using GAQL], the returned report doesn't contain correct data for the "campaign.labels" field. The "campaign.labels" field is empty for every single report row returned by this query, even when campaigns DO have labels applied to them in the Google Ads UI. 

Here's code to reproduce the issue:

function main() {
  var report = AdsApp.report('SELECT campaign.name, campaign.labels FROM campaign', {"apiVersion": "v9"});
  var rows = report.rows();
  while (rows.hasNext()) {
    var row = rows.next();
    Logger.log("Campaign Name: " + row["campaign.name"] + "\n" + "Campaign Labels: " + row["campaign.labels"]);
  }  
}

Google Ads Scripts Forum Advisor

unread,
Dec 21, 2021, 4:54:43 AM12/21/21
to adwords...@googlegroups.com
Hi John,

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

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 the spreadsheet privately via the reply to author option. I would appreciate it as well if you can provide a Google Ads UI screenshot of the data you expect to retrieve from the script. On the other hand, can you confirm if you are experiencing the issue with the new Google Ads Scripts Beta or this is happening even with using the current scripts version?

Looking forward to your reply.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2TOFLW:ref

John Maher

unread,
Dec 21, 2021, 9:55:54 PM12/21/21
to Google Ads Scripts Forum
Hi Harry,

Thank you so much for your reply. I have collected all the information you requested. However, when I try to click the "Reply to author" button, it's greyed out and says I do not have permission to reply to you. Do you know any way around this error so that I can reply to you? Thanks in advance for your help with this!


Screenshot of reply to author error::

Screen Shot 2021-12-21 at 6.50.41 PM.png

Google Ads Scripts Forum Advisor

unread,
Dec 22, 2021, 2:17:47 AM12/22/21
to adwords...@googlegroups.com
Hi John,

Thanks for getting back. You can send private information through our email (googleadsscripts-support@google.com) instead.

Google Ads Scripts Forum Advisor

unread,
Dec 23, 2021, 2:10:27 AM12/23/21
to adwords...@googlegroups.com
Hi John,

Thanks for coming back with the requested details. This seems to be a known issue with the campaign view report so allow me to make a follow up on the team's progress on the issue and update you accordingly. On the other hand, I would recommend pulling the Campaign Performance Report or retrieving labels through the AdsApp.​Campaign.labels() object for the meantime.

Let me know if you have other questions or concerns I can help you with.

Google Ads Scripts Forum Advisor

unread,
Dec 2, 2022, 5:26:13 AM12/2/22
to adwords...@googlegroups.com

Hi,

James here, also a member of the Google Ads scripts team.

Hope you're doing well. I would like confirm if you are still encountering the issue on your end? Looking forward to hearing from you.

Regards,

Google Logo
James Howell
Google Ads Scripts Team
 


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