TwoSquaresTwoSquares
ContactFree Audit
ENBG
  1. Home
  2. Scripts
  3. Duplicate Query Conflict Finder
Back to scripts

Duplicate Query Conflict Finder

Finds search terms appearing across multiple campaigns/ad groups so you can reduce overlap and cannibalization.

search-termsaccount-structurewaste-control

Script Details

Name
Duplicate Query Conflict Finder
Author
Kiril Ivanov
Updated
2026-02-27

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

  1. Set LOOKBACK_DAYS and MIN_CLICKS based on account traffic.
  2. Run once manually and validate overlap rows with campaign intent.
  3. Use output to add negatives or restructure ad groups for cleaner routing.
  4. Schedule weekly to maintain structural hygiene.

More Scripts In This Library

Previous Script

Display Placement Domain Excluder

Next Script

Enabled Ad Count By Ad Group

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.

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