Exclude exact in DSA adgroups

Automatically exclude all exact keywords in DSA adgroups. Search traffic will land in the most relevant adgroup.

Start Now!
Exclude exact-match keywords in DSA adgroups
Exclude Get started!

Do you use DSA adgroups within your search campaigs? You may be using DSA for keywordmining or to increase your impressions. If you have separate DSA adgroups in your account, it is recommended to exclude all search terms that you already advertise on. Then your adgroups do not compete with each other and the searchterms enter the adgroup with the most relevant ads.

This script helps you with this and is easy to use. It automatically adds all exact-match keywords as a negative keyword in your DSA adgroup.

Do you use seperate DSA-campaigns? We also have a script to exclude keywords that way!


  • LOG: Specify whether the script should report the intermediate steps, by adjusting the value to 'true'.
  • DSA_ADGROUP_NAME: Enter (part of) the name of your DSA adgroups.
The script
// Copyright 2020. Increase BV. All Rights Reserved.
// Not to be used without permission of the creator or Increase B.V.
// Created By: Tibbe van Asten
// for Increase
// Created: 01-10-2019
// Last update: 04-05-2020
// This script will help the account kept clean.
// Exact match keywords will be excluded in the DSA adgroups.

var config = {

  // Set LOG to true to check for errors. Once this script runs
  // smootly, set to false to improve script performance.
  LOG : true,

  // All DSA adgroups will have the following mark in the name



function main(){
  var adGroupIterator = AdsApp
    .withCondition("Name CONTAINS '"+config.DSA_ADGROUP_NAME+"'")
    .withCondition("Status = ENABLED")
    .withCondition("CampaignStatus = ENABLED")
    var adGroup = adGroupIterator.next();
    var campaign = adGroup.getCampaign();
    var keywordIterator = campaign
      .withCondition("Status = ENABLED")
      .withCondition("KeywordMatchType = EXACT")
      .withCondition("AdGroupStatus = ENABLED")

      var keyword = keywordIterator.next().getText();
        if(config.LOG === true){
          Logger.log("Excluded "+keyword+" in "+adGroup.getName());
    } // keywordIterator
  } // adGroupIterator

} // function main()
Show whole script!
Loading Comments
The Experts
Tibbe van Asten Team Lead Search
Nils Rooijmans Water Cooler Topics
Martijn Kraan Freelance PPC Specialist
Bas Baudoin Teamlead SEA @ Happy Leads
How about you? JOIN US!
Sharing Knowledge

Sharing Knowledge

Adsscripts.com is all about sharing knowledge. In the current market, PPC specialists like to keep their knowledge and experience to themselves. We're convinced that sharing knowledge can ensure that everyone gets better at their work. We want to change this by sharing our knowledge about scripts with everyone.

Do you also want to contribute? We are open to new ideas and feedback on everything you find on Adsscripts.com.

Contact us

Training &
Contact us!
Adsscripts Training & Workshop