Placement Exclusion Manager
Finds Display and YouTube placements with low CTR or high CPA and excludes them from campaigns. Runs in dry-run mode so you can review the list before applying.
by Dmytro Tonkikh·chiliad.io
Overview
Placement Exclusion Manager pulls 30 days of placement-level data from Display and YouTube campaigns, then identifies placements that fall below your CTR threshold or exceed your CPA limit. The exclusion list is logged so you can review it before you commit; set EXCLUDE_PLACEMENTS = true to apply the exclusions across all matching campaigns.
Setup
- 1Create a new script and paste the code.
- 2Run in preview mode to see which placements would be excluded — review the log carefully.
- 3Adjust MIN_IMPRESSIONS to ensure you only evaluate placements with sufficient data.
- 4Set MAX_CTR to your acceptable lower bound (default 0.001 = 0.1% CTR).
- 5Optionally set MAX_CPA to also exclude high-CPA placements (0 = disable).
- 6When happy with the list, set EXCLUDE_PLACEMENTS = true and run to apply.
- 7Schedule weekly to catch new underperforming placements.
Configuration Variables
| Variable | Default |
|---|---|
EXCLUDE_PLACEMENTS | false |
MIN_IMPRESSIONS | 500 |
MAX_CTR | 0.001 |
MAX_CPA | 100 |
Expected Output
=== Placement Exclusion Manager === Underperforming placements found: 3 [EXCLUDE] example-games-site.com Brand Awareness Campaign Impr: 8420 CTR: 0.002% CPA: N/A [EXCLUDE] random-news-portal.net Shopping Display Impr: 2100 CTR: 0.000% CPA: $148.20 Set EXCLUDE_PLACEMENTS = true to apply exclusions.