Thursday, November 29, 2012

Automating Maintenance Tasks With AdWords Scripting Part 1

I'm not ashamed.  I read "for Dummies" books.  And one of my favorites is AdWords for Dummies. Say what you want about these books, but they are easy to read and have great info for getting started quickly.

One of the chapters in the book describes a monthly routine for maintaining your AdWords account.  Using AdWords scripts is a good way to automate these tasks.  Let's start with the first of the month.

"On the first day of the month, deal with all the keywords that are converting too expensively."

Sounds simple enough.  Of course, you will need to have set up conversion tracking for all of this to work. They say pull the last 30 days, which is what we have done here, but you can pull any time range you like.  This follows the example from the book.  You should of course replace the values at the top with ones that make sense for your business.

// Reduce Bids on High Cost per Conversion Keywords
// Created By: Russ Savage
function main() {
  //Let's reduce keywords with a CPC greater than $15 by 35%
  //And keywords with CPC between $10 and $15 by 20%
  var kw_iter = AdWordsApp.keywords()
    .withCondition("Status = ENABLED")
  while(kw_iter.hasNext()) {
    var kw =;
    var kw_stats = kw.getStatsFor("LAST_30_DAYS");
    var cost = kw_stats.getCost();
    var conversions = kw_stats.getConversions();
    if(conversions > 0) {
      var cost_per_conversion = (cost/(conversions*1.0));
      //Here is the magic.  If it is way too high, reduce it by the way too high amount
      if(cost_per_conversion >= WAY_TOO_HIGH_COST_PER_CONV) {
        kw.setMaxCpc(kw.getMaxCpc() * (1-WAY_TOO_HIGH_BID_REDUCTION_AMOUNT)); 
      //otherwise, if it is still too high, reduce it with just the too high amount
      else if(cost_per_conversion >= TOO_HIGH_COST_PER_CONV) {
        kw.setMaxCpc(kw.getMaxCpc() * (1-TOO_HIGH_BID_REDUCTION_AMOUNT));
      //no conversions on this keyword
      //we will deal with that later
And that's it. Stay tuned for the next installment where we tackle the keywords that are performing well by increasing their bids.



  1. Can this script work with automated bid strategy?

  2. I would use this script for this webpage! Thanks a lot!

  3. اگر مایلید کتاب های انگلیسی زبان و جدید رابخوانید و یا برای پیشبرد تحقیقاتتان به کتابی انگلیسی زبان نیاز دارید اما ترجمه کتاب و خواندن متن های انگلیسی برای شما دشوار است. در وب سایت ترجمه آنلاین با نازل ترین قیمت و بالاترین کیفیت کتاب های درخواستی خود را ترجمه کنید.

  4. buy a perfect gift for Christmas or buy new jewelry for parties, see the new collection of necklace for women , it's the most beautiful jewelry ever, shine bright like a diamond!

  5. Your blog is filled with unique good articles! I was impressed how well you express your thoughts.
    best plex plugins

  6. I'm not ashamed. I read "for Dummies" books. And one of my favorites is ...
    PLAYit For PC

  7. Hello your post is amazing and I like it so much it helps me to understand a lot of things which cover my curiosity and now you can visit my site: Archero Mod Apk

  8. Bolly4u is one of the most popular torrent websites, Find Latest Bolly4u new and updates and Download Bolly4u movies of Bollywood and Hollywood movies Online: Bolly4u org, Bolly4u in along with Hindi dubbed movies are available for Free at Bolly4u com.

  9. We Post WordPress Tutorials for beginners and expret Developers and also publish JavaScript Tutorials ..
    WP Scriptor

  10. If you own a MacBook, I would recommend you to buy USB-C flash drive for Macbook

  11. There are many other Video editing application but no one is like Kinemaster Pro APK 2020. This one is really easy to use and takes very little time to edit videos.kinemaster diamond mod apk

  12. There are many other Video editing application but no one is like Kinemaster Pro APK 2020. This one is really easy to use and takes very little time to edit videos.kinemaster diamond mod apk

  13. It's no wonder that in recent whatsapp plus became a huge part of our lives. It's conveyears nient quick and easy to use.

  14. Great Article. Really Informative and Helpful. Appreciate it. Keep it up. Check How to Make Money From Google Adsense

  15. In this article, I am going to cover 10 must-have accessories for best ultrawide gaming monitor MacBook.

  16. I completely resolved my question when I read this post, thanks to the author for the very detailed description. I wrote my review on the, you can go in and read. Thank you very much for your attention in your time.

  17. Facebook and youtube animation video creators has been establishing itself as a productive maker of anime films for quite a while now.Studio has won hearts of all ages by utilizing incredible narrating combined with stunning, regularly jaw-dropping animation. The absolute most visually staggering universes and characters actually to grace the big screen have come from this Tokyo team.