AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Ads
4.1K members online now
4.1K members online now
For questions related to Google Shopping and Merchant Center. Learn to optimize your Shopping ads
Guide Me
star_border
Reply

How to receive the custom_label_0 (shopping) in Adwords Script?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

I am trying to get the custom_label_0 in Google Script. I want to make a (string) comparison with this field.

 

I got this script: 

 

var productAds = shoppingAdGroup.ads().get();
  while (productAds.hasNext()) {
    var productAd = productAds.next();
   Logger.log("Ad with ID = %s and custom label line = '%s' was found.", productAd.getId().toFixed(0), productAd.getEntityType());
}

 

 

It gives me the ID of the ad en the type "getEntityType" : productAd. But I need the "custom label 0" of this ad.

 

Anyone?

1 Expert replyverified_user

Re: How to receive the custom_label_0 (shopping) in Adwords Script?

[ Edited ]
Top Contributor
# 2
Top Contributor