Display Placement Domain Excluder
Excludes display placements that match domain rules and optionally adds them to a shared excluded placement list for broader reuse.
Script Code
Use this when you want a simple domain-pattern exclusion script for display placements with optional shared-list maintenance.
Preview is public. Unlock full code with name and email.
/**
* ==========================================================
* Display Placement Domain Excluder
* ==========================================================
* Description: Excludes display placements that match a
* configurable set of domain patterns.
*
* Copyright (c) 2026 TwoSquares. All Rights Reserved.
* Developed by Kiril Ivanov
*/
function main() {
var EXCLUSIONS_LIST = "Auto Excluded Placements";
// ... preview shortened
}About This Script
Display Placement Domain Excluder is a lightweight placement cleanup script for display campaigns. It reviews website placements over a selected lookback window, matches them against a list of terms such as low-quality TLDs, and excludes matching placements.
This updated version uses current GAQL reporting with explicit API versioning and fixes several rough edges from the original draft, including excluded placement list creation, duplicate-safe handling, and builder result access.
Because this script can make direct exclusions, match rules should be kept conservative. It is best used for obvious placement patterns rather than subjective quality decisions.
Implementation Notes
- Set the lookback window, impression threshold, and exclusion terms for your account.
- Run manually first and inspect the logged matches before scheduling.
- Decide whether you want to add matches to a shared excluded placement list as well as exclude at ad-group level.
- Keep the exclusion term list tight and review it regularly.
- Use conservative rules for production to avoid blocking useful placements by accident.
More Scripts In This Library
Automatic Video Placement Exclusion
Excludes low-view-rate video placements from video campaigns using current GAQL reporting and duplicate-safe batching.
Placement Exclusion Candidate Finder
Finds expensive non-converting placements in Display/Video campaigns to support exclusion decisions.
YouTube Channel Exclusion Audit And Blocker
Reviews YouTube placements in video campaigns, whitelists acceptable channels in a sheet, and excludes channels that fail your country or topic rules.
Account Anomaly Detector
Compares today’s account performance against the same weekday across previous weeks and alerts when impressions, clicks, conversions, or cost move outside expected bounds.
Display Placement Domain Excluder FAQs
Common setup, usage, and troubleshooting questions for this script.