Keyword Labels

57 views
Skip to first unread message

Martin Scholz

unread,
Jun 29, 2021, 3:12:21 AM6/29/21
to AdWords API and Google Ads API Forum
Hello,

we are using the following report to get stats from keywords including their assigned labels:

    var report = AdsApp.report(
    'SELECT Criteria, Clicks, Impressions, Labels ' +
    'FROM KEYWORDS_PERFORMANCE_REPORT ' +
    'WHERE Status = ENABLED AND AdGroupStatus = ENABLED AND CampaignStatus = ENABLED ' +
    'AND AdGroupName DOES_NOT_CONTAIN "zz" ' +
     'AND Criteria CONTAINS "atollo" ' +
    'AND AdNetworkType2 = SEARCH ' +
    'AND Device IN ["DESKTOP"] ' +
    'DURING LAST_WEEK ');

Facing the sunset of the AdWords API, we tried the Query Migration Tool, getting this result:

SELECT ad_group_criterion.keyword.text, metrics.clicks, metrics.impressions, ad_group_criterion.labels, segments.ad_network_type, segments.device FROM keyword_view WHERE ad_group_criterion.status = "ENABLED" AND ad_group.status = "ENABLED" AND campaign.status = "ENABLED" AND ad_group.name NOT REGEXP_MATCH ".*zz.*" AND ad_group_criterion.keyword.text REGEXP_MATCH ".*atollo.*" AND segments.ad_network_type = "SEARCH" AND segments.device IN ("DESKTOP") AND segments.date DURING LAST_WEEK_MON_SUN

But "ad_group_criterion.labels" doesn´t seem to be the right attribute, showing only "undefined" results.

Can you get the keyword labels in an report including metrics? 

Thanks!

Greetings
Martin
AWQL-query.PNG
AWQL-report.PNG
GAQL-query.PNG
GAQL-report.PNG

Google Ads API Forum Advisor

unread,
Jun 30, 2021, 3:19:53 PM6/30/21
to m.sc...@prediger.de, adwor...@googlegroups.com
Hi Martin,

The ad_group_criterion.labels is the correct attribute to get the labels associated with a keyword. I see that you are using Ads scripts. As this may be an issue that is specific to scripts, I would recommend asking their team in the Ads scripts forum.

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


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