An introduction to Google AdWords scripts

Share this Article:

What are Google AdWords scripts?

AdWords scripts are snippets of JavaScript that can be executed through the AdWords console to automate tasks using the functions built in by Google. These can range from simple reporting, to using API to connect and use external services. For example, the OpenWeatherMap API alternates bids based on the weather conditions in a certain area.

Why use AdWords scripts?

AdWords scripts can save a lot of time on the day-to-day management of PPC campaigns by automating a wide variety of tasks, such as sending e-mail alerts and reports, storing data in Google Docs, and connecting to external services. Checking for 404 errors is now effortless thanks to the recent MCC scripts release.

Scripts can be scheduled to run as often as hourly, taking a weight off the account manager’s shoulders. You can write your own scripts using JavaScript, or find resources online.

AdWords scripts case study

Upon noticing that one client’s website had ‘In Stock’ or ‘Out of Stock’ on their product pages, I wondered how much of their PPC budget was being spent on clicks leading to out-of-stock products.

I implemented a script to search landing pages for that ‘In Stock’ or ‘Out of Stock’ HTML within select campaigns, and instructed it to change the ad status accordingly. It would pause the ad if the associated product was out of stock, and enable the ad if the product came back in stock.

Straight away I noticed a dip in cost, cost per conversion and bounce rate. All I needed to do was schedule a script to run hourly and let it do the work for me.


Want more help optimising your PPC campaigns? Get in touch with our expert team now. 


From powerful brand propositions, customer-centric experiences or creative search campaigns, our proven approach overcomes obstacles and delivers commercial success.


We work fast and break norms by applying innovation, intelligence and creativity to everything we do.​ We look for people who share our passion and ambition.


Find out more



Interested in finding out more about how we deliver outstanding results? Speak to our experts today.