How to obtain several KWs from its label

73 views
Skip to first unread message

Jon Castaño

unread,
Oct 5, 2022, 12:20:27 PM10/5/22
to Google Ads Scripts Forum
Hello, 

I am trying to obtain information of several Kws from its label. I have this query:

  var query = 'SELECT ad_group_criterion.position_estimates.top_of_page_cpc_micros, segments.day_of_week, ' +
                'ad_group_criterion.criterion_id, ad_group_criterion.keyword.text, ad_group.id, ad_group.name, ' +
                'campaign.name, metrics.impressions, metrics.absolute_top_impression_percentage, ' +
                'ad_group_criterion.effective_cpc_bid_micros, ad_group_criterion.position_estimates.first_page_cpc_micros, ' +
                'ad_group_criterion.labels, bidding_strategy.type, segments.ad_network_type ' +
                'FROM keyword_view ' +
                'WHERE ad_group_criterion.status = "ENABLED" ' +
                'AND ad_group.status = "ENABLED" ' +
                'AND campaign.status = "ENABLED" ' +
                "AND ad_group_criterion.labels CONTAINS ANY (" + labelArray + ") " +
                'AND segments.ad_network_type = "SEARCH" ' +
                'AND segments.date DURING TODAY';

  // Start the iteration on all the KWs
  var report = AdsApp.report(query);
  var reportRows = [];
  var rows = report.rows();
  while(rows.hasNext()) {
    var row = rows.next();

I have two KWs with the same label but I can only extract one KW within the iteration, could you help me with this ??

Thanks a lot in advance.

Best regards,

Jonatan

Jon Castaño

unread,
Oct 17, 2022, 6:35:08 AM10/17/22
to Google Ads Scripts Forum
Hello, I would appreciate any help. I think this is an important issue...

Thanks a lot,

Jonatan

Google Ads Scripts Forum

unread,
Oct 20, 2022, 4:17:29 AM10/20/22
to Google Ads Scripts Forum
Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/kD4vjMchqrU) from the forum as it wasn't routed to our support queue.

Regards,
Yasmin
Google Ads Scripts Team

Google Ads Scripts Forum

unread,
Oct 20, 2022, 11:32:31 PM10/20/22
to Google Ads Scripts Forum
Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/kD4vjMchqrU) from the forum as it wasn't routed to our support queue.

Regards,
Yasmin
Google Ads Scripts Team

Google Ads Scripts Forum Advisor

unread,
Oct 21, 2022, 6:56:55 AM10/21/22
to adwords...@googlegroups.com

Hi Jonatan,

 

Thank you for reaching out to us. This is Yasmin from the Google Ads scripts team. Please excuse us as your messages failed to be routed to our support queue.

 

Could you please provide the following information so we can further investigate and assist you accordingly?:

  • Google Ads account ID or CID
  • Script name
  • Screenshots of the issue

 

Kindly send the requested items via `Reply privately to author` option. If the said option is not available on your end, you may send those through the email alias `googleadsscr...@google.com` instead.

 

Regards,

 

Google Logo
Yasmin Gabrielle
Google Ads Scripts Team
 


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