Duplicate Query Conflict Finder
Finds search terms appearing across multiple campaigns/ad groups so you can reduce overlap and cannibalization.
Script Code
Useful for tightening query routing and negative strategy in larger multi-campaign accounts.
Preview is public. Unlock full code with name and email.
/**
* ==========================================================
* Duplicate Query Conflict Finder
* ==========================================================
* Description: Finds search terms triggering in multiple
* campaign/ad group combinations.
*
* Copyright (c) 2026 TwoSquares. All Rights Reserved.
* Developed by Kiril Ivanov
*/
function main() {
var SPREADSHEET_URL = "";
var SHEET_NAME = "Query Conflicts";
var LOOKBACK_DAYS = 30;
// ... preview shortened
}About This Script
Duplicate Query Conflict Finder identifies search terms that are triggering in multiple active campaign/ad group combinations. This helps detect overlap that can dilute control, inflate CPCs, or fragment performance signals.
The script aggregates occurrences and cost by search term, then highlights terms with multiple placements so you can decide where each query should live.
It supports resilient Google Sheet output: blank URL auto-creates a new spreadsheet; provided URL writes to existing sheet and creates tab if needed.
Implementation Notes
- Set LOOKBACK_DAYS and MIN_CLICKS based on account traffic.
- Run once manually and validate overlap rows with campaign intent.
- Use output to add negatives or restructure ad groups for cleaner routing.
- Schedule weekly to maintain structural hygiene.
More Scripts In This Library
Week-over-Week Query Growth Waste Alert
Detects search terms whose spend is growing week-over-week while conversions remain weak or zero.
Negative Keyword Conflict Checker
Flags potential conflicts where converting search terms may be blocked or constrained by existing negative keywords.
Search Term N-Gram Waste Finder
Aggregates expensive non-converting n-grams from search terms to speed up negative keyword decisions.
Search Term Waste Finder
Finds high-cost, non-converting search terms, prioritizes them by wasted spend, and can send an optimization digest by email.
Duplicate Query Conflict Finder FAQs
Common setup, usage, and troubleshooting questions for this script.