Automate your stock management on AdWords


Once you start using Adwords 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 an Adwords 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, Adwords 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 Adwords script and incorporate a Lengow product feed to have a constantly up to date product inventory.

How to enter your script into Adwords

Adwords 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 Adwords script based on stock:

1/ Set yourself up with a spreadsheet provided by Google (find the spreadsheet example here), or with our ‘Adwords 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 Adwords 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