How to fix "AdsApp is not defined" error

Posted 1 year ago

"ReferenceError: AdsApp is not defined"

This error is caused by 1 of 3 things:
1) Google Ads Bug
2) You're not in Google Ads
3) You've installed a single-account script at Manager Level

1) Google Ads "new experience" bug

If you're in Google Ads and in the appropriate account type it's probably a Google Ads bug.
Where this is the issue, the error is usually on line 1. The error will say "ReferenceError: AdsApp is not defined (line 1)".
The fix is to create a new copy of the script.
 

  1. Rename the script, appending OLD to the end (or whatever you like)
  2. Go back to Scripts
  3. Click the + icon to create a new script
  4. Paste in the script, preview, and authorize
  5. Give it the same name as the previous script (optional)


You can then disable the old script. 
Remember to:
 - Remove the schedule (frequency) from the old script
 - Set up the schedule on the new script
 - Update any links to the script

 

2) You're not in Google Ads

"AdsApp' only exists in Google Ads Scripts.
It isn't available within Google Apps Scripts which can be standalone or attached to a Google Spreadsheet.
Fix: make sure you're in Google Ads (the url should say ads.google.com...)

3) You've installed a single-account script at manager level


Fix: open up the account then add the script.

For the unaware, a manager account is an umbrella account which can't directly serve ads. If you don't have a manager account, this won't be the issue.
One way of telling if you're at manager level is to click Tools & Settings. Under Setup if you can see "API Center" then you're at Manager level.
You'll also see "Accounts" in the left sidebar at Manager level.
 

Still not working?


Get in touch and we'll see what we can do.

Back to the Blog


Join my Google Ads Automation Newsletter

Subscribe and I'll send the odd email when I publish new scripts & tools

    We respect your privacy. Unsubscribe at any time.