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
// FreeAdWordsScripts.com
//-----------------------------------
function main() {
  //Let's reduce keywords with a CPC greater than $15 by 35%
  var WAY_TOO_HIGH_COST_PER_CONV = 15;
  var WAY_TOO_HIGH_BID_REDUCTION_AMOUNT = .35;
  
  //And keywords with CPC between $10 and $15 by 20%
  var TOO_HIGH_COST_PER_CONV = 10;
  var TOO_HIGH_BID_REDUCTION_AMOUNT = .20;
  
  var kw_iter = AdWordsApp.keywords()
    .withCondition("Status = ENABLED")
    .get();
  
  while(kw_iter.hasNext()) {
    var kw = kw_iter.next();
    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));
      }
    }else{
      //no conversions on this keyword
      //we will deal with that later
      continue;
    }
  }
}
And that's it. Stay tuned for the next installment where we tackle the keywords that are performing well by increasing their bids.

Thanks,
Russ

73 comments:

  1. Can this script work with automated bid strategy?

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

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

    ReplyDelete
  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!

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

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

    ReplyDelete
  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

    ReplyDelete
  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.
    Bolly4U

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

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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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.

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

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

    ReplyDelete
  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 https://paperwritingservices.reviews/, you can go in and read. Thank you very much for your attention in your time.

    ReplyDelete
  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.

    ReplyDelete
  18. If you’re looking for the best social media management service then it is the best solution for you.which is a well-known and trustworthy.

    ReplyDelete
  19. Hi,If you are looking for reasons why avast using 100 diskand the best methods to solve them out then this site can graeatly help for detail information visit the site.

    ReplyDelete
  20. Nice post. This post was very interesting. click this

    ReplyDelete
  21. We provide cheap golf products. On some products have discount offer. These golf products are light in weight . Quality of these products are good. If you buy two product you will get one product free . Here you will find all sizes of golf products. For more information you can visit on our website click this

    ReplyDelete
  22. We provide cheap theme and plugin . On some paid theme and plugin have discount offer. If you buy two theme and plugin you will get more discount . Here you will also find free theme and plugin. Design of free theme and plugin are good . For more information you can visit on our website click this . We also provide wp rocket plugin click this

    ReplyDelete
  23. We do SEO to increase website rank in google search engine. It give a boost energy to website in google search engine. We make backlinks on high DA and PA website. We follow the guidelines of google search engine. For more information you can visit on our website click this . We also provide tips of how to start a blog and earn money click this

    ReplyDelete
  24. We provide cheap paddle boards. On some paddle boards have discount offer. These paddle boards are light in weight . Quality of these paddle boards are good. Here you will find all sizes of paddle boards. For more information you can visit on our website click this

    ReplyDelete
  25. Nice post. This post was very interesting. I have noted some important points in my notes book. All the content in this post are good. Keep sharing this type of post with us. click this

    ReplyDelete
  26. We provide free and paid hosting. On some paid hosting have discount offer. If you buy two hosting you will get more discount . You can use free hosting for maximum one year. After one year you have to pay for continuous. Speed of free hosting is fast. We also provide share hosting and cloud ways hosting. click this . We also provide hostinger hosting review click this

    ReplyDelete
  27. Nice post. This post was very useful for me. I got many information from this post. Thanks for share this post with us. I have noted some important points in my notes book .All the content in this post are good.This post was readable.click this . We also provide hostinger hosting

    ReplyDelete
  28. We provide all company customer care number. All numbers are toll free numbers. If your product damage with in warranty you can visit on our website and get the number of that company and call them and replace your product. Services of these numbers are 24*7 days. For more information you can visit on our website click this . We also provide ekart customer care number click this

    ReplyDelete
  29. Nice post. This post was very useful for me. I got many information from this post. Thanks for share this post with us. I have noted some important points in my notes book. All the content in this post are good. Keep sharing this type of post with us. click this

    ReplyDelete
  30. We do SEO to increase website rank in google search engine . It give a boost energy to website in google search engine. We make backlinks on high DA and PA website. We follow the guidelines of google search engine. For more information you can visit on our website click this .

    ReplyDelete
  31. We provide cheap artificial product. On some products have discount offer. If you buy two product you will get one product free. These products are light in weight. Quality of these products are good. Keep sharing this type of post with us. For more information you can visit on our website. jewelery set . We also provide earing set for women earings for women

    ReplyDelete
  32. Thank you for writing a good article. Please keep giving me good information. 메이저토토사이트

    ReplyDelete
  33. Promoslot sebagai situs judi casino online paling dipercaya dan terlengkap di Indonesia, di mana situs judi ini sediakan rangkaian tipe permainan judi online paling komplet dalam kelasnya. Dari tiap tipe permainan judi yang didatangkan situs promoslot ialah beberapa game yang umum banyak diunggulkan bettor dan banyak dimainkan di situs judi online terbaik.
    Related Link : tutorial judi slot | judi slot bet kecil | slot 777 | slot pragmatic

    ReplyDelete
  34. This comment has been removed by the author.

    ReplyDelete
  35. Hey, thank you a lot for sharing this article with us. I can’t say, how grateful we are to read this. Also, I would love to check out other articles. Kinemaster Mod Apk

    ReplyDelete
  36. A good informative post that you have shared and thankful your work for sharing the information. I appreciate your efforts and all the best.

    brankaspedia

    ReplyDelete
  37. Do you know which is best Tracking & Courier service, We find alots of butt we cant, Thank you,DHL Tracking

    ReplyDelete
  38. Do you know which is best Tracking & Courier service, We find alots of butt we cant, Thank you,Tracking the parcel

    ReplyDelete
  39. opposed to the liver, give that advantage without the dangers. The medical advantages of and are connected, unsaturated fats. Advantage of cod liver oil is likewise identified with its nutrient peptide powder suppliers

    ReplyDelete
  40. YOU WILL GET CUSTOM PACKAGING BOXES OF EVERY TYPE TRY OUR Beauty Cream Box

    ReplyDelete
  41. These sites are stable, offer instant payments in your paypal and are not meant to make you fool.
    Take the time to extend your program from the starting as well as the foundation could keep on providing the company well ahead of the
    establishment phase. Unless you incorporate some technical
    exposure to web servers you might battle to perform your own server management and administrative tasks.풀싸롱

    ReplyDelete
  42. Wow! This can be one particular of the most beneficial blogs We have ever arrive across on this subject.
    Feel free to visit my website 코인카지노

    ReplyDelete
  43. Thanks for sharing amazing article. i hope also doing well in the future. Also visit vefeed.com for famous celebrity biography.

    ReplyDelete
  44. I've been searching for hours on this topic and finally found your post. Tài xỉu, I have read your post and I am very impressed. We prefer your opinion and will visit this site frequently to refer to your opinion. When would you like to visit my site?

    ReplyDelete
  45. Pretty nice post. I just stumbled upon your weblog and wished to say that I have truly enjoyed surfing around your blog posts. In any case I will be subscribing to your rss feed and I hope you write again soon 먹튀신고

    ReplyDelete
  46. This comment has been removed by the author.

    ReplyDelete
  47. Nice information, valuable and excellent design, as share good stuff with good ideas and concepts. 스포츠토토사이트

    ReplyDelete
  48. What a nice post! I'm so happy to read this. 토토사이트추천 What you wrote was very helpful to me. Thank you. Actually, I run a site similar to you. If you have time, could you visit my site? Please leave your comments after reading what I wrote. If you do so, I will actively reflect your opinion. I think it will be a great help to run my site. Have a good day.

    ReplyDelete
  49. I am constantly surprised by the amount of information accessible on this subject. What you presented was well researched and well written to get your stand on this over to all your readers. Thanks a lot my dear. 토토사이트

    ReplyDelete
  50. Great article. Really informative and helpful. Thanks for sharing it with us. Appreciate it. You might be looking for ReapIt an IT consultant company based in Bangalore.

    ReplyDelete
  51. I am constantly surprised by the amount of information accessible on this subject. What you presented was well researched and well written to get your stand on this over to all your readers. Thanks a lot my dear. 토토사이트

    ReplyDelete