PMax Placement Cleaner
Automatically identifies and excludes undesirable placements from Performance Max campaigns. Fetches placement URLs, checks page titles against keyword and domain blocklists, and adds negative placements in bulk.
by Dmytro Tonkikh·chiliad.io
Overview
PMax Placement Cleaner scans your Performance Max placement report for new website placements, fetches each page title, and matches them against your keyword and domain blocklists stored in a Google Sheet. Matching placements are automatically added as account-level negative placements. All checked placements are logged to the sheet so they are not re-processed.
Setup
- 1The script will auto-create a Google Drive folder structure: '🤖 TrueClicks scripts / {Account Name} / Placement Cleaner'.
- 2On first run it copies a template spreadsheet with three sheets: 'results' (checked placements), 'keywords' (title blocklist), and 'domains' (domain blocklist).
- 3Add unwanted keywords to the 'keywords' sheet (one per row) — e.g. 'casino', 'adult', 'torrent'. The script matches these against page titles.
- 4Add unwanted domains to the 'domains' sheet (one per row) — e.g. 'example.com'. The script matches these against placement URLs.
- 5In your Google Ads account, go to Tools → Bulk Actions → Scripts.
- 6Click the + button to create a new script and paste the code.
- 7Authorize the script when prompted (it needs access to Google Drive, Sheets, and external URLs).
- 8
Expected Output
Script start: 123-456-7890 Spreadsheet url: https://docs.google.com/spreadsheets/d/... Placements update Finished update Excluded placements: 12 Checked placements: 88
Notes
The script processes up to 100 new placements per run to stay within Google Ads script execution limits. It skips mobile app and YouTube placements. The template spreadsheet is copied from a shared Google Drive file on first run.