I want to make an Adwords Script for a MCC account which contains several child-accounts labeled with multiple labels. I am looking for a Loop of all child-accounts and retrieving all labels per each child-account.
Here I will simulate an example how it is structured:
Root: (MCC Account)
Child-accounts:
1) English_Account (id: 1111-1111-111, labels: Priority-high; 60%)
2) Spanish_Account (id: 2222-2222-222, labels: Priority-medium; 30%)
3) German_Account (id: 3333-3333-333, labels: Priority-low; 10%)
Now, I am doing a Loop of all accounts and I want to retrieve all labels per each account (just to mention that labels are dynimically set according to budget spent). That`s why I need to retrieve them, in order to apply some functions for next steps according to Label Name.
var accountIds = ['1111-1111-111', '2222-2222-2222-222', '3333-3333-3333-333'];
var accounts = MccApp.accounts().withIds(accountIds).get();
while (accounts.hasNext()) {
var account = accounts.next();
// here should be something to retrieve all child-account labels
}
I would much appreciate all your suggestions or tips how to achieve this task.