Update labels for keywords

41 views
Skip to first unread message

Ajay.R

unread,
Jul 15, 2022, 1:33:13 AM7/15/22
to Google Ads API and AdWords API Forum
Hi google ads team,
I am using Python library , How to assign an existing label for the keyword.
I have tried this,
google_ads_client = self.google_ads_api_client(self.refresh_token, self.login_customer_id)
agc_service = google_ads_client.get_service('AdGroupCriterionService')
agc_operation = google_ads_client.get_type('AdGroupCriterionOperation')
label_service = google_ads_client.get_service('LabelService')

#update zero conversion keyword with labe 'paused by zc'
ad_group_criterion = agc_operation.update
ad_group_criterion.resource_name = agc_service.ad_group_criterion_path(customer_id, ad_group_id, criterion_id)
ad_group_criterion.labels = label_service.label_path(customer_id, label_id)
google_ads_client.copy_from( agc_operation.update_mask,
protobuf_helpers.field_mask(None, ad_group_criterion._pb),
)

but not updating

Ajay.R

unread,
Jul 15, 2022, 2:52:45 AM7/15/22
to Google Ads API and AdWords API Forum
Why I am not getting a reply?

Google Ads API Forum Advisor

unread,
Jul 15, 2022, 3:52:24 AM7/15/22
to ajaylin...@gmail.com, adwor...@googlegroups.com

Hi Ajay,

Thanks for reaching out to the Google Ads API Forum.

Labels allow you to categorize your campaigns, ad groups, ads, and keywords, and use those categories to simplify your workflow in a variety of ways. For more information, you may refer to this guide. However, for us to check your request where labels are not updated, could you provide us with the complete request and response logs with the request-id, so our team can better check?

For the client library, logging can be enabled by navigating to the Client libraries > Your client library (select Python) > Logging documentation, which you can access from this link. You may then send the requested information via the Reply privately to author option.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cWO2x:ref

Ajay.R

unread,
Jul 15, 2022, 4:26:03 AM7/15/22
to Google Ads API and AdWords API Forum
Thanks Google ads Team, 
Now its working by calling the AdgroupCriterionLabelService and mutating with ad_group_criterion resource name
Thanks.

Google Ads API Forum Advisor

unread,
Jul 15, 2022, 6:58:07 AM7/15/22
to ajaylin...@gmail.com, adwor...@googlegroups.com

Hi Ajay,

Good day to you.

Thank you for sending updates on your concern. If you have additional questions regarding the topic being discussed in this thread, feel free to send those over to our team and we would be happy to assist you further.


Cheers,

Google Logo
Anthony Cyril
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cWO2x:ref

Ajay.R

unread,
Jul 15, 2022, 7:01:38 AM7/15/22
to Google Ads API Forum Advisor, adwor...@googlegroups.com
Thank you for your response. 
Reply all
Reply to author
Forward
0 new messages