Wednesday, October 30, 2013

Disable Ads and Keywords For Out of Stock Items

UPDATE 2016-01-26: In response to some common issues, this script has been updated to include some enhancements. Please see the change log notes for v1.2.

As a follow up to my questions about cool scripts for Black Friday / Cyber Monday, today I put together a script to run through your urls and check if the item is out of stock on the website. If it is, we will pause the AdGroup.

This script has some of the same elements of my script on checking for broken links in your account, but it actually pulls the html source of each page and searches for a configurable string that lets it know when it is out of stock.

Let's walk through an example. I love some of the quirky gifts I find on ModCloth.com. But like any online store, some items go out of stock. Here is one I found while testing this script.
In order to get this script to work, I need to find out what is different about the page when it goes out of stock. If I right click and view the page source, and search for the work "stock", I can see a few different places where it is used. One of them is the following that says "in_stock":false.
That looks promising. I check on an in stock item and sure enough, "in_stock":true is on that page.

Alright, so now I know what text I need to use to fill in the OUT_OF_STOCK_TEXT variable in my code. Now each site is going to be a little different, so I have a simple script that uses the same url logic as the complete script that you can use for testing.

Once you find some HTML text in the source of the landing page that identifies if an item is out of stock, you should be good to go on the full script. There are a few other options in the script that allow you to enable or disable various url manipulations in the script. And remember, this will pause only the Ads or Keywords that link to the page with the out of stock item.

Thanks,
Russ

48 comments:

  1. It’s amazing in support of me to truly have a web site that is valuable meant for my knowledge.sell closeout merchandise

    ReplyDelete
  2. Thanks, great script!
    Would it be possible to run the script based on adgroup labels as well? So instead of campaign labels?

    ReplyDelete
  3. We offer the best stock alert service with swing trade alerts, day trade alerts, and penny stock alerts Best Stock Alert Service

    ReplyDelete
  4. I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work. ลงโฆษณาในเฟสบุ๊ค

    ReplyDelete
  5. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. Thank you for the post. Investments in Stock Exchange

    ReplyDelete
  6. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing. Begin Your Best Lifestyle Investments Today. wealth

    ReplyDelete
  7. Once you have an understanding of how the stock market works, then you should be able to make educated investment decisions. money gain plan website

    ReplyDelete
  8. Its as if you had a great grasp on the subject matter, but you forgot to include your readers. Perhaps you should think about this from more than one angle. Stock market

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

    ReplyDelete
  10. i used it on a client website vitalefy, it worked like a charm

    ReplyDelete
  11. I am comfortable to locate your distinct way of writing the post. Now you make it handy for me to apprehend and enforce the concept. Thank you for the post. see Locksmith Newport

    ReplyDelete
  12. Great content ideas, this website every content very informative. thanks Biggest gamestore in africa

    ReplyDelete
  13. Stock market investing is lucrative; a query should strike the mind of an investor before entering the world of a stock trader, i.e. ‘How Stock Market Works?’ Stock Broker or an experienced stock trader can help you a lot in clearing your doubts related to your query. It seems a difficult question, but has a simple answer and can be understood without any confusion. Companies are always looking forward to raise their capital for development purposes to get more profit for the organization.

    ReplyDelete
  14. This is a really great Juicer Deals for Black Friday product for the price. I was nervous about getting a low priced juicer thinking it would wear out quickly and not blend very well. This juicer blends fantastic and a super super easy to clean and put away quickly.

    ReplyDelete
  15. Great script, thanks a lot. A couple of questions I would appreciate if you can help with:

    1. Can I add a Keyword label instead of Campaign label to filter the keywords I want the script to look at? Would be more convenient for me as I have campaigns that contain both category/product URLs so this way it also pauses keywords with category landing pages when only one of the items is out of stock? Other way to avoid this would be to add the URL string identifying product pages, e.g. /products/?

    2. I noticed the script also enables paused keywords which are in stock. However, it could be that those keywords are paused on purpose due to poor performance. Is there a possibility that instead the script adds a label to Out of Stock keywords and next time it runs, it also checks paused keywords with the Out of Stock label to see whether the item is back in stock in order to enable it again?

    Thanks a lot in advance.
    Galina

    ReplyDelete
    Replies
    1. Point 2 very valid; would appreciate insight into being able to work around this! Unless you were to remove every previous poor performing ad (a chore in itself, as well as potential loss of data), then this script in its current form isn't really viable.

      Delete
  16. interesting blogs, every post very effective and informative. thanks judi kartu online

    ReplyDelete
  17. Presents a brilliant provider! He changed into very pleasant and informed best scale for weed

    ReplyDelete
  18. This is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work. Selling Put Options - The Minister of Capitalism

    ReplyDelete
  19. I really happy found this website eventually. Really informative and inoperative, Thanks for the post and effort! Please keep sharing more such blog.
    lash shampoo

    ReplyDelete
  20. Thanks for the information, very clear and simple. I will try to use it.365makmur

    ReplyDelete
  21. Nice article and really useful for me....hire a killer

    ReplyDelete
  22. The post is effective. Thanks a lot for shearing with us. j curl lashes

    ReplyDelete
  23. Very good blog article. Thanks Again. Really Great.eyelash extension glue

    ReplyDelete
  24. I genuinely satisfied found this internet site eventually. Truly informative and inoperative, thank you for the post and attempt! Please preserve sharing more such blog.
    Wimpernverlängerung Salzbur

    ReplyDelete
  25. I think your post is very important for our.so, thank you for ithire a hitman

    ReplyDelete
  26. You've extremely helped American state perceive the problems. each post could be a ton of informative and Effective. thanks for your useful post.contract killers

    ReplyDelete
  27. I truly cheerful discovered this site in the long run. Truly educational and out of commission, Thanks for the post and exertion! It would be ideal if you continue sharing all the more such blog.visit my site hitmen for hire

    ReplyDelete
  28. I have realized massive information from here. I am ready for your updates. dtla

    ReplyDelete
  29. Thanks for share the super articles, i will additionally share with my buddies and one once more thanks a lot. downtown LA

    ReplyDelete
  30. The best collection of unique quotes, wishes and messages. On Happy Birthday wishes for a loved one and celebrate the birthday uniquely.

    ReplyDelete
  31. Your dad means the world to you and is everything to your family. To properly celebrate his big day, put together all his favorite things to make this the best day he has ever had. Get the perfect wishes on Happy birthday wishes for father to tell him how much you love him and how much you appreciate the work and love he puts into your life.

    ReplyDelete
  32. Really appreciate you sharing this article. Thanks Again. Fantastic.....cheap places in Los Angeles

    ReplyDelete
  33. Get your own custom made CBD Mailer Boxes designed with Custom Boxes Printing. We offer a variety of custom shapes & styles for your die cut CBD mailer boxes.

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

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

    ReplyDelete
  36. First, thank you for this very helpful information. For the first time in a long time, I’m actually excited about something. Something that can/will continue, unlike a craft project that has an end.bitcoin

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

    ReplyDelete
  38. Consistently I used to go to see this site, for the explanation that I need delight, mix funds safely

    ReplyDelete
  39. Thanks for your nice post I really like it and appreciate it. My work is about Quality Packaging Solution. If you need perfect quality boxes then you can visit our website.

    ReplyDelete
  40. Your Post is very informative. If you are looking for the best Handmade Soap Boxes then Check out our Exculsive range of Custom Soap Boxes at wholesale Price with free home Delivery. We are serving thousands of businesses in the UK, Canada and USA.

    ReplyDelete
  41. Your article is very useful for us. If you are looking for the Cheap Bespoke Boxes Manufacturer then Check out our Exculsive range of bespoke Boxes at wholesale Price.

    ReplyDelete