Razvan
Razvan

Reputation: 125

Google ads script, AdsApp.adGroups().get() returning empty

I am developing a google ads script to run and create negative keywords, i get the performance using an SQLreport and when i try to create a negative keyword it does not work because when i try to return existing adgroups and initialize them, i get an empty result.

var adGroups = AdsApp.adGroups().get();
Logger.log('Total adGroups found : ' + adGroups.totalNumEntities());

This returns: Total AdGroups found : 0 -> but i have multiple running ads/adgroups in that sub-account.

Upvotes: 0

Views: 230

Answers (1)

Razvan
Razvan

Reputation: 125

because i was using google shopping i should have used: AdsApp.shoppingAdGroups()

Upvotes: 2

Related Questions