Remove empty ad groups

212 views
Skip to first unread message

Ian

unread,
Jul 15, 2021, 7:17:35 AM7/15/21
to Google Ads Scripts Forum

Hello everyone,

I need to delete empty ad groups from my search campaigns. That is, they do not contain keywords and ads.

I have looked through the documentation and can't think of a way to do this without going through group by group checking for items within the group.

Can anyone help me?

Google Ads Scripts Forum Advisor

unread,
Jul 16, 2021, 12:44:10 AM7/16/21
to adwords...@googlegroups.com
Hi Ian,

Thanks for reaching out. Harry here, from the Google Ads Scripts Team.

This is most probably possible, but I believe you would have to create custom script to best achieve your requirement. However, one thought to take in mind is that you can only pause ad groups via AdsApp.​AdGroup. With the Bulk Upload function through scripts, you can. Please see Bulk upload - supported entities (Ad Groups) for your reference.

Furthermore, you can take advantage of iterators for Keyword and Ad entities respectively to check if they don't contain anything using the iterator.totalNumEntities() method. See KeywordIterator and AdIterator also.

Let me know your thoughts. We can proceed from there.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


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