TwoSquaresTwoSquares
ContactFree Audit
ENBG
  1. Home
  2. Scripts
  3. Display Placement Domain Excluder
Back to scripts

Display Placement Domain Excluder

Excludes display placements that match domain rules and optionally adds them to a shared excluded placement list for broader reuse.

displayplacementsexclusionsshared-lists

Script Details

Name
Display Placement Domain Excluder
Author
Kiril Ivanov
Updated
2026-03-19

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

  1. Set the lookback window, impression threshold, and exclusion terms for your account.
  2. Run manually first and inspect the logged matches before scheduling.
  3. Decide whether you want to add matches to a shared excluded placement list as well as exclude at ad-group level.
  4. Keep the exclusion term list tight and review it regularly.
  5. Use conservative rules for production to avoid blocking useful placements by accident.

More Scripts In This Library

Previous Script

Disapproved Ad Checker

Next Script

Duplicate Query Conflict Finder

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.

Dominate your market. Own your growth.

Let's build measurable growth together.

Get Free Audit
TwoSquares

Full-service digital growth agency. SEO, PPC, paid social, GEO and web development for UK brands ready to scale.

ENBG

Ask AI about TwoSquares

ChatGPT
Perplexity
Grok
Claude
Gemini

Services

  • SEO
  • GEO
  • PPC
  • Paid Social
  • Email Marketing
  • Web Design & Dev
  • CRO
  • Strategy & Planning
  • Consultancy
  • Custom Solutions

Solutions

  • AI Search Growth System
  • Demand Generation & Lifecycle
  • Pay-Monthly Websites

Audits

  • PPC Audit
  • SEO Audit
  • GEO Audit
  • Website Audit
  • Full Marketing Audit
Featured on Best in Britain

Company

  • About Us
  • Our Brands
  • Blog
  • Contact
  • Case Studies
  • Careers
  • Templates

Resources

  • Resources Hub
  • AI Readiness Toolkit
  • SEO Glossary
  • Free Tools

Industries

  • Hotels & Resorts
  • Property & Rentals
  • Restaurants & Bars
  • E‑commerce & DTC

Connect

[email protected]
SSL Secured
GDPR Compliant

© 2026 TwoSquares Limited (SC877356). All rights reserved.

Privacy PolicyTerms of ServiceCookie PolicySitemap

TWOSQUARES