Unable to Apply Negative Keyword List to Performance Max Campaigns via Scripts

80 views
Skip to first unread message

Mario Pizzeri

unread,
Jan 2, 2025, 12:22:51 PMJan 2
to Google Ads Scripts Forum

I’m attempting to apply a shared negative keyword list to my Performance Max campaigns using Google Ads Scripts. However, despite having active and delivering Performance Max campaigns, the script does not detect them.

Steps Taken:
  1. Verified the Performance Max campaigns exist, are active, and are delivering in the Google Ads UI.
  2. Used a Google Ads Script to iterate over all campaigns and explicitly filter for:
    • Campaigns with AdvertisingChannelType = PERFORMANCE_MAX.
    • Campaigns whose names contain _PMax
  3. Successfully applied the negative keyword list to Shopping campaigns, but the script does not recognize any Performance Max campaigns.
  4. Tested multiple variations of the script to:
    • Log all campaigns and their attributes (e.g., name, type, and status).
    • Bypass type filtering to directly match campaign names.
  5. Logs indicate that no Performance Max campaigns are found in the account.

Could you confirm why the Performance Max campaigns are not being detected via Google Ads Scripts, even though they are active and visible in the Google Ads UI? Are there specific API limitations or alternative methods to achieve this?

Google Ads Scripts Forum

unread,
Jan 2, 2025, 4:50:07 PMJan 2
to Google Ads Scripts Forum
Hi,

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

Please be informed that the Performance Max campaigns can only be selected if you are using the Performance Max Campaign selector in the script. If you use the standard AdsApp.campaigns() method, the script won't iterate through the PMax campaigns and this method will only detect Search & Display campaigns.

If you still face any issues even after using the PMax campaign selector, kindly provide us with the following details to investigate further on the issue.
  • Google Ads account ID/CID
  • Name of the affected script
  • Shareable spreadsheet link if you are using any in the script
You can share the requested details via Reply privately to the author option or a direct private reply to this email. 

Thanks,
Google Ads Scripts team

Nils Rooijmans

unread,
Jan 3, 2025, 9:35:26 AMJan 3
to Google Ads Scripts Forum
Unfortunately, Google does not allow us to add negative keyword lists to our PMax campaigns ourselves.

You can ask Google Support to add a negative keyword list to your PMax campaigns for you via the 'Performance Max Campaign Modification Request Form'.
Once they have added the list to your campaigns, you can use scripts to add negative keywords to the list.

More details:

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/  
Reply all
Reply to author
Forward
0 new messages