Monday, November 19, 2012

Pause All Keywords With No Impressions

Let's start with a very simple script. This one will find all of the keywords in your account that has never had an impression, and pause (or delete if you see the comment below) that keyword so that it will not negatively impact your quality score. According to Google, the longer something sits in your account and stagnates, the greater the impact to your quality score. As a reader pointed out, the fourth bullet here seems to contradict this statement. This would be a great script to schedule every few months to make sure you are trimming all the dead weight from your accounts.

Thanks,
Russ
/*********************************************
* Pause Keywords With No Impressions All Time
* Version 1.1
* Changelog v1.1
*   - Updated for speed and added comments 
* Created By: Russ Savage
* FreeAdWordsScripts.com
**********************************************/
var TO_NOTIFY = "your_email@domain.com";
function main() {
  // Let's start by getting all of the keywords with no impressions
  var kwIter = AdWordsApp.keywords()
    .withCondition("Impressions = 0") // could be "Clicks = 0" also
    .forDateRange("ALL_TIME") // could use a specific date range like "20130101","20131231"
    .withCondition("Status = ENABLED")
    .withCondition("CampaignStatus = ENABLED")
    .withCondition("AdGroupStatus = ENABLED")
    .get();
 
  // It is much faster to store all the keywords you want to process
  // and then make the changes all at once. This takes advantage
  // of the batch processing behind the scenes.
  var toPause = [];
  while (kwIter.hasNext()) {
    var kw = kwIter.next();
    toPause.push(kw);
    // This is to make sure you see things during the preview
    // When you run it for real, you can remove this clause to
    // increase speed.
    if(AdWordsApp.getExecutionInfo().isPreview() &&
       AdWordsApp.getExecutionInfo().getRemainingTime() < 10) {
      break;
    }
  }
  
  // Now go through each one and pause them.
  for(var i in toPause) {
    toPause[i].pause();
    //Or you could use toPause[i].remove(); to delete the keyword altogether
  }
  
  // Sent an email to notify you of the changes
  MailApp.sendEmail(TO_NOTIFY, 
                    "AdWords Script Paused "+toPause.length+" Keywords.", 
                    "Your AdWords Script paused "+toPause.length+" keywords.");
}

40 comments:

  1. Although I can see the logic in this script isn't the flaw that if I added a keyword yesterday then it may not get an impression immediately but could within 30 days. If I'm always adding keywords then how can I be sure I'm turning off "old" ones?

    ReplyDelete
  2. That's true Robert, this script will have issues dealing with new keywords. I think you can fix it by using labels.

    For example, for new keywords, when you add them in adwords, give them a label of "NEW". Then, in the script above, add .withCondition("LabelNames CONTAINS_NONE ['NEW']") to the keyword selector logic.

    Now the issue is how to remove the "NEW" label after 30 days. I am currently working on a script that will manage labels so that you can tell how old an entity is. I will post a link here when i complete it. I have also added a feature request to the AdWords Scripts forum for accessing CreateDate which would make this much easier: https://developers.google.com/adwords/scripts/community?place=topic%2Fadwords-scripts%2FcoLUX4sLuQo%2Fdiscussion

    Thanks,
    Russ

    ReplyDelete
  3. This page contains the most interesting persuasive essay topics. Learn what is in the trend right now.

    ReplyDelete
  4. I can only express a word of thanks. Because with the content on this blog I can add knowledge I, thank has been sharing this information. Do not forget to visit our website to share information hotele

    ReplyDelete
  5. I don't really understand a thing about script writing. Thus, I am a professional writer at bestwritingservice.com and it is not a problem for me to write an essay on any topic

    ReplyDelete
  6. Great script. Even better with the labels

    ReplyDelete
  7. You are in debt and want a way out! Contact us. Our financial experts will guide you with perfect Debt Settlement via the best Debt Settlement Companies.

    ReplyDelete
  8. Search engines function as matchmakers connecting those with the problems to those with solutions. As a blogger or website owner we want to be the "go to" place for people looking for solutions in our area of expertise.adwords keyword wrapper

    ReplyDelete
  9. If you are finding deals and offers for American Airlines, dial American Airlines Reservations Number and talk with agents. American Airlines Reservations Number is toll free.

    ReplyDelete
  10. The most popular is the assignment provided by a team of experts. According to experts, All Assignment Help can prove to be very helpful for developing communication skills. Having Done My Homework

    ReplyDelete
  11. Choices are accessible, in any case. It is conceivable to sidestep Google and other subsidiary advertisers by setting ads straightforwardly on a site you decide for merits you transparently perceive, with no surprises revenue driven sharing.Free Google Ads Audit

    ReplyDelete
  12. Millions of people around the world complete their daily task with the help of HP devices. If you come across any technical issue with HP device then don’t worry, get HP Support Assistance from deft technicians. They have years of experience and easily resolve your HP device issues.

    ReplyDelete
  13. At myassignmenthelp, all our writers take the similarity issue or in other words, plagiarism issue very seriously and as for such reason we make sure that all our projects are delivered with less than 20% similarity. So if you need case study help, marketing assignment help, matlab assignments, spss assignments, finance assignments, accounting assignments, or need assignment help with any other subject than feel free to order through your assignments through www.myassignmenthelp.com.au

    ReplyDelete
  14. Virus Solution Provider - Online World Wide Data Recovery
    Data Recovery Customer Care +91 999-081-5450 .We at Virusolutionprovider, understand the vital importance of your data and its significance in your business. We help you retrieve and recover your lost data due to any technical glitch or human error. Our programs are specially designed to scan whole memory hierarchy for lost data files and to retrieve the lost data back to the initial storage location. Our aim is to retrieve all of your data without any data or information loss. We have a skilled team with years of experience in the field of data recovery. We are committed to provide effective solutions related to data loss to our customers, with minimum response time and at optimal price.
    Go to the Official Website
    https://www.virusolutionprovider.com
    Call our Support Number = +91 (999) 081-5450 (WhatsAap call or Direct Call)

    ReplyDelete
  15. I have read your blog and its really interesting. If you wanna know about accounting services than contact Internal tax service. Read More: ITS llc

    ReplyDelete
  16. What a nice blog! I have enjoyed reading through the article although I landed on this site while I was looking for online assignment help for my assignments. I will be visiting this site sporadically to read more interesting and intriguing articles. I hope the writer will frequently keep us updated with new information.

    ReplyDelete
  17. HP printers offer very good quality printouts and clear examining. In the event that you need to deal with your printer with the assistance of a product at that point Download HP Printer Assistant. It's a free utility programming offered by HP to its clients. In the event that you have any question with respect to this product, at that point contact specialists to find support.
    HP Printer not printing error

    ReplyDelete
  18. Awesome Post keep it up. I like to read your Post. Now a day it is very normal issue Add a Wireless Printer to a Mac? their are very few and simple steps to resolve this problem or you have any issues regarding the printer call us at any time at our Toll-Free number. We feel pleasure to help you.

    ReplyDelete
  19. Other aspects of racism can be traced from acts of early imperialists. freelance writer for hire

    ReplyDelete
  20. Take Online Assignment Help and connect with online tutors to lighten your academic stress effectively. To access these services, you need to log in or fill the order now form. Share your project details correctly, so that you will get the right content according to your requirements. You don’t need to pay a hefty amount for hiring an academic writer for your academic papers. Connect with a reliable service provider and get the awesome online academic writing services at the best market price.
    Assignment Help Company

    ReplyDelete
  21. Get complete programming homework without even writing a single word using a Programming help . You will get a chance to connect with an experienced programmer using Programming assignment help online services.
    Java Programming Help

    ReplyDelete
  22. Search Plumbers in tucson and find our plumbers across the United States. We provide best plumbing services, actively responding to query of Plumbers in taledo.

    ReplyDelete
  23. In the event that you have any question with respect to this product, at that point contact specialists to find support.

    ReplyDelete
  24. I have purchased new land for building a modernized residential home. I have a map to design my home beautifully and construct it strongly, so I can live in this home for many and many years. I have also the designs for a car basement and roof. I want to use steel building solutions for my residential house. Now, I don’t have the right option to choose appropriately. There are many Pre Engineered Building Manufacturers
    available on the Internet, but I have a different choice for the best company. I look for affordable rates but believe in quality. I am weighing all the options for the budget and ease of the project. So, anyone can suggest the name of the best steel building company.

    ReplyDelete
  25. Allassignmenthelp helps you acquire high grades by supplying expert best taxation assignment help. excellent online taxation homework help stuff together with your essays, case studies. best taxation assignment help

    ReplyDelete
  26. Turn your dreams of travelling into reality and gets booking done via Southwest Airlines Book A Flight and enjoy your journey in the air. Call our experts now!

    ReplyDelete
  27. Use Assignment Help services when you have issues in writing your academic papers for Australian universities. Take the assistance of online tutors to get excellent academic writing for your project submission at my time and make your submission countable for the entire session.
    My Assignment Help
    Assignment Help Online
    Online Assignment Help

    ReplyDelete
  28. Unbelievable blog! This blog gives a brief introduction of Nepal tourism and its tourist places. This blog is full of interesting things that travelers should know about Nepal Tour . I am very happy with this interesting blog.
    Visit us : Nepal Tour Package
    Nepal Tour Packages

    ReplyDelete
  29. Contact our agents and Book A Flight with Qatar Airways. We provide you discounts & offers on every Qatar Airlines Book A Flight.Find best offers and deals with all the flights!

    ReplyDelete
  30. Superb blog and really great topic you choose. You know the most amazing thing I like in your article is your choosing words. Many times I see lots of new words in your article. I am also here for my Garmin Express web page promotion. Garmin Express in an app, which is used to manage Garmin devices. So if you using Garmin product and your Garmin Express Not Working or product requires Garmin express update then contact us from the Garmin Express Updates team. And please visit the web page for more information. Download Garmin express

    ReplyDelete