Identify duplicate keywords

Identify duplicate keywords within the same publisher account and recommend which keyword should remain active based on recent keyword performance.

What can I do with this?

  • Review duplicate keyword
  • Use the output report to create a bulk upload to pause the duplicate keywords


How it works

The script reviews each account for duplicate active keywords. It creates a report with the identified keywords and emails it, including a recommendation on which keyword to keep based on:

  • Cost
  • Quality Score
  • Conversion Rate
  • Impression Share

If all keywords in a campaign are losing, it will also recommend a new name for the campaign.



  • The client needs to have 8 columns defined to hold the duplicate information. See code for details


  • See code below for required columns in the report


  • Adjust metric used to determine the winning keyword
  • Change naming convention for renaming campaigns



Written by Wes MacLaggan

Last published at: June 3rd, 2024