Performance Max Channel Split Script

234 views
Skip to first unread message

Kristalynn Yue

unread,
Mar 18, 2024, 4:47:18 AM3/18/24
to Google Ads Scripts Forum
Hi there,

I'm trying to run a script to get a channel spend split for PMax, but keep encountering an error that says:

ReferenceError: AdsManagerApp is not defined at getAccountSelector (Code:122:25) at main (Code:24:25) at Object.<anonymous> (adsapp_compiled:20662:54)  

I'm applying this script at Child Account level, instead of Sub-MCC or MCC level, so wondering if anyone knows what's the cause of the error?

Thanks!

Privileged/Confidential Information may be contained in this message. If you are
not the addressee indicated in this message (or responsible for delivery of the
message to such person), you may not copy or deliver this message to anyone. In
such case, you should destroy this message and kindly notify the sender by reply
email. Please advise immediately if you or your employer does not consent to email
for messages of this kind. Opinions, conclusions and other information in this
message that do not relate to the official business of Group M Worldwide LLC and/or
other members of the GroupM group of companies shall be understood as neither given
nor endorsed by it. GroupM is the global media investment management arm of WPP.
For more information on our business ethical standards and Corporate Responsibility
policies please refer to WPP's website at http://www.wpp.com/WPP/About/

Google Ads Scripts Forum Advisor

unread,
Mar 18, 2024, 10:34:15 AM3/18/24
to adwords...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads Scripts support team.

By reviewing your concern, I understand that you are getting an error ‘ReferenceError: AdsManagerApp is not defined at getAccountSelector’ while trying to run a script to get a channel spend split for PMax campaign.

The error only occurs when trying to place an MCC level script onto a single account. Can you please double check the account you are using to ensure it's a manager account? If you are still facing issues, kindly provide us with the following details:
  • Google Ads account ID / CID
  • Name of the affected script
  • Uncropped UI screenshot of the issue
If the script uses a spreadsheet, please provide a shareable link to the spreadsheet.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02s00wT:ref" (ADR-00227628)

Thanks,
 
Google Logo Google Ads Scripts Team


Nils Rooijmans

unread,
Aug 29, 2024, 3:29:25 AM8/29/24
to Google Ads Scripts Forum
If you get this error then most probably one of the following issues occurred:

(1) You are running an MCC level script on the single account level. Try running it inside your MCC Manager account, or get a version of the script that is designed for single accounts.
(2) You’re running the code in Google Sheets instead of Google Ads. 

 More details: https://nilsrooijmans.com/google-ads-scripts-faq/referenceerror-adsmanagerapp-is-not-defined-how-to-fix/

Hope this helps,

Nils Rooijmans
https://nilsrooijmans.com
See my Google Ads Scripts FAQ to avoid the same mistakes I made: https://nilsrooijmans.com/google-ads-scripts-faq/

Google Ads Scripts Forum Advisor

unread,
Aug 29, 2024, 7:07:13 AM8/29/24
to adwords...@googlegroups.com
Hi,

@ Nils - Thank you for your input.

You may follow Nil's suggestion. Let me know how it goes on your end and If you face any issue, provide us with the following details to investigate the issue further: 

    • Google Ads account ID / CID
    • Name of the script
    • If the script uses spreadsheet, kindly provide the shareable link to the spreadsheet to share a file publicly
    Reply all
    Reply to author
    Forward
    0 new messages