How to select child accounts in Link_Checker_done (official Google script)

123 views
Skip to first unread message

Peter Agerholm

unread,
May 27, 2020, 4:26:00 AM5/27/20
to Google Ads Scripts Forum
Hi

How do I get your Link Checker MCC script to only include specific child accounts in the MCC?
https://developers.google.com/google-ads/scripts/docs/solutions/adsmanagerapp-link-checker

I've tried to test with both account id's and names in the following code snippet of the script (line 64-67):

    // A list of ManagedAccountSelector conditions to restrict the population
    // of child accounts that will be processed. Leave blank or comment out
    // to include all child accounts.
    ACCOUNT_CONDITIONS: [], 

But all I get is this error:

Exception: One of the conditions in the query is invalid. (file Code.gs, line 219)

So what do I need to change specifically in line 219?

 // Get up to 50 accounts that have not yet had all of their URLs checked.
    var accountSelector = getAccounts(false).withLimit(50);
    if (accountSelector.get().hasNext()) {
      accountSelector.executeInParallel('processAccount', 'processResults',
                                        JSON.stringify(options));
    } else {
      processResults([]);
    }
  }

Hope you can assist on this one :)

Google Ads Scripts Forum Advisor

unread,
May 27, 2020, 6:24:03 AM5/27/20
to adwords...@googlegroups.com
Hi Peter,

Thanks for posting your concern.

The available conditions that you can set for this field ACCOUNT_CONDITIONS: [] are listed here. However, it not possible to select the child accounts using the account name and account ID on the current setup of the solution script.

As a workaround, you may find the line of codes below:
 if (CONFIG.ACCOUNT_CONDITIONS) {
    for (var i = 0; i < CONFIG.ACCOUNT_CONDITIONS.length; i++) {
      accountSelector =
          accountSelector.withCondition(CONFIG.ACCOUNT_CONDITIONS[i]);
    }
  }

Then, replace it with this line of code:
      accountSelector = accountSelector.withIds(CONFIG.ACCOUNT_CONDITIONS);

After modifying the code, you may now put the customer IDs of the child account to the ACCOUNT_CONDITIONS: [] field and you may refer to the sample format below.
ACCOUNT_CONDITIONS: ['123-456-7890', '098-765-4321', ......]

Let me know if you have question and clarification with the provided suggestion.

Regards,
Ejay
Google Ads Scripts Team

ref:_00D1U1174p._5004Q1zsC0G:ref

Peter Agerholm

unread,
May 27, 2020, 7:34:28 AM5/27/20
to Google Ads Scripts Forum
I can't get it to work...

Resuming work from a previous execution. Found 0 this execution.

Google Ads Scripts Forum Advisor

unread,
May 27, 2020, 12:11:21 PM5/27/20
to adwords-scripts+apn2wqe4kvzom6uj...@googlegroups.com, adwords-scripts+apn2wqe4kvzom6uj...@googlegroups.co, adwords...@googlegroups.com
Hi Peter,

Can you please provide privately with your CID and script name so that we can take a look in your account?

Thanks,
Matt

Joliene Ivory

unread,
May 27, 2020, 2:09:40 PM5/27/20
to Google Ads Scripts Forum on behalf of adsscriptsforumadvisor
Yes, thanks my CID is: 
998-637-0917 and the scripts name is "Keyword Conflict Report"


--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/7HYf1000000000000000000000000000000000000000000000QAZZMM00k5tQzeaGQ4yAOhYIKVcu9g%40sfdc.net.


--
Thanks,

Joliene Ivory
Wholesaling PPC

Google Ads Scripts Forum Advisor

unread,
May 27, 2020, 4:12:42 PM5/27/20
to adwords...@googlegroups.com
Hi Peter,

You previously mentioned your issue was with the link checker, not the negative keywords conflict solution. I do not see the link checker script in the account you provided -- can you kindly send us the account and script name once more?

Joliene Ivory

unread,
May 28, 2020, 2:28:38 PM5/28/20
to Google Ads Scripts Forum on behalf of adsscriptsforumadvisor
Hello,
I provided access to the Google doc for this, but I haven't had an update as of yet.

Google Ads Scripts Forum Advisor

unread,
May 28, 2020, 2:50:50 PM5/28/20
to adwords...@googlegroups.com
Hi Peter,

I replied yesterday, but it seems it did not get through. Hoping this finds you, and please see my response below:

You previously mentioned your issue was with the link checker, not the negative keywords conflict solution. I do not see the link checker script in the account you provided -- can you kindly send us the account and script name once more?

Thanks,
Matt 
Google Ads Scripts Team

ref:_00D1U1174p._5004Q1zsC0G:ref

Peter Agerholm

unread,
May 28, 2020, 3:08:52 PM5/28/20
to Google Ads Scripts Forum
JI - this is not your thread! Please stop replying to this!

On Thursday, 28 May 2020 20:28:38 UTC+2, JI wrote:
Hello,
I provided access to the Google doc for this, but I haven't had an update as of yet.

On Wed, May 27, 2020 at 2:09 PM Joliene Ivory <sup...@ppcturnkey.com> wrote:
Yes, thanks my CID is: 
998-637-0917 and the scripts name is "Keyword Conflict Report"


On Wed, May 27, 2020 at 12:11 PM Google Ads Scripts Forum on behalf of adsscriptsforumadvisor <adwords...@googlegroups.com> wrote:
Hi Peter,

Can you please provide privately with your CID and script name so that we can take a look in your account?

Thanks,
Matt
Google Ads Scripts Team

ref:_00D1U1174p._5004Q1zsC0G:ref

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords...@googlegroups.com.


--
Thanks,

Joliene Ivory
Wholesaling PPC

Peter Agerholm

unread,
May 28, 2020, 3:14:01 PM5/28/20
to Google Ads Scripts Forum
Hi Matt

I did reply to you privately earlier today?

But anyhow, the user "JI" did make a response to the wrong thread here obviously, which has caused some confusion. I'm sorry about that!

The CID is 811-825-2129 and the name of the script is 6. Google_Link-checker-done_MCC.

Google Ads Scripts Forum Advisor

unread,
May 28, 2020, 4:40:56 PM5/28/20
to adwords-scripts+apn2wqe4kvzom6uj...@googlegroups.com, adwords-scripts+apn2wqe4kvzom6uj...@googlegroups.co, adwords...@googlegroups.com
Hi Peter,

Sorry for the confusion earlier.

The user that implements the link checker must login directly at the MCC level that they wish the script to run at. That is, they cannot login at a higher MCC level, then drill down to a lower MCC and install the script. This is likely the cause of the invalid label ID errors you are getting. Labels are tied to the account that the user logs in at. 

Please try logging in directly to the MCC that you provided, create a new script, and then implement the link checker.


Thanks,
Matt 
Google Ads Scripts Team

ref:_00D1U1174p._5004Q1zsC0G:ref

Peter Agerholm

unread,
May 29, 2020, 5:13:00 AM5/29/20
to Google Ads Scripts Forum
Hi Matt

I want to get the child accounts? It didn't work either though after implementing it on our agency MCC level?



Do I have to change anything in the below-mentioned?


  // Get up to 50 accounts that have not yet had all of their URLs checked.
  var accountSelector = getAccounts(false).withLimit(50);
  if (accountSelector.get().hasNext()) {
    accountSelector.executeInParallel('processAccount', 'processResults',
                                      JSON.stringify(options));
  } else {
    processResults([]);
  }
}

Google Ads Scripts Forum Advisor

unread,
May 29, 2020, 6:11:53 AM5/29/20
to adwords...@googlegroups.com
Hi Peter,

Could you provide the customer ID and the name of the script where the issue occurred? I tried checking the history logs of the script 6. Google_Link-checker-done_MCC in the account 811-825-2129 but I couldn't find the error shown on your screenshot.

Regards,
Ejay
Reply all
Reply to author
Forward
0 new messages