Automate your stock management on Google Ads (AdWords)


Once you start using Google Ads Campaigns, managing them can prove time consuming, especially when your ads’ price and stock information are continuously changing. In order to spend that time on your strategy rather than your campaigns and to avoid any stock errors, you can automate your campaigns using a Lengow feed and a Google Ads script.


If you sell products online, your stock numbers are likely to constantly be in flux. So, to keep your ads and stock in sync, Google Ads provides advertisers with a script based on inventory. The script enables you to deactivate campaigns when the products are no longer in stock. This way, you can control your spending and avoid customer disappointment if they are faced with an unavailable product.

Note: we are focusing on an online retailer’s product catalogue, but this technique can also be applied to a plethora of cases where you want to activate or deactivate an ad based on the availability of products or services (property listings, holidays, small ads, job offers…).

To help automate your stock management, find out how to configure this Google Ads script and incorporate a Lengow product feed to have a constantly up to date product inventory.

How to enter your script into Google Ads

Google Ads provides a number of scripts to allow advertisers (without technical knowledge) to automate their actions, such as the creation, modification and removal of elements in their account to save both time and money.

To configure your Google Ads script based on stock:

1/ Set yourself up with a spreadsheet provided by Google (find the spreadsheet example here), or with our ‘Google Ads business data’ (available within the Lengow platform) to automate your actions and benefit from an up to date feed. This step allows you to fill in information about your products with attributes such as: Code, stock, etc.

2/ Once you have done that, log on to your Google Ads account and click on the ‘Campaigns’ heading, then on ‘Bulk operations’, then ‘Scripts’. This is where you create a new script.

3/ Add in the script’s code (available here), then change the ‘SPREADSHEET_URL’ variable to your own URL.

Note:  each product should have a unique code to enable correspondence.

stock management on Adwords

If you want to go further and input a more advanced script, our partner, JVWEB, has developed the ‘Out of Stock’ script. By using this, the agency specialising on online marketing allows advertisers to send their stock numbers to AdWords in real time.

Elizabeth Norton

Your e-commerce library

4 Top Tips for Selling on Marketplaces (Home and Garden)

Learn more

Marketplace Horror Stories

Learn more

Master Intelligent Google Campaigns

Learn more

Sign up for our newsletter

By submitting this form you authorize Lengow to process your data for the purpose of sending you Lengow newsletters . You have the right to access, rectify and delete this data, to oppose its processing, to limit its use, to render it portable and to define the guidelines relating to its fate in the event of death. You can exercise these rights at any time by writing to