AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

1.5K members online now
1.5K members online now
Improve your Google Ads performance and boost your ROI, CTR, and Quality Score
Guide Me

Need an AdWords script that adjust bids by impression

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hey all.


I'm looking for some script in which I can increase the bids for 0 impression keywords and decrease the bid for keywords with more than XX impressions, with top and bottom limits.


I need to control my costs and that's one of the ways I intend to do so.


Can someone help me out?





Re: Need an AdWords script that adjust bids by impression

[ Edited ]
Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆

Hi Pedro.

You don't need AdWords scripts for that.
You can use an automated rules. Below is an example configuration for increasing bids if there wasn't impressions in previous day.


adwords rule.png


But if you must to do this by script below is an example one:


var dateRange = "YESTERDAY";
var decreaseCpcMultiplier = 0.97;
var increaseCpcMultiplier = 1.03;
var minImpressios = 100;

function main() {
var campaigns = AdWordsApp.campaigns().withCondition("Status = ENABLED").get();
var campaign =;
var adgroups = campaign.adGroups().withCondition("Status = ENABLED").get();
var adgroup =;
var keywords = adgroup.keywords().withCondition("Status = ENABLED").get();
var keyword =;
var impressions = keyword.getStatsFor(dateRange).getImpressions();
var cpc = keyword.bidding().getCpc();
if(impressions == 0){
var newCpc = cpc * increaseCpcMultiplier;

else if(impressions > minImpressios){
var newCpc = cpc * decreaseCpcMultiplier;




But I'm not sure that the number of impressions is the best metric for making bids adjustments.

Re: Need an AdWords script that adjust bids by impression

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
It may be not the best metric, but what I need now is just to impress no matter what position.
I believe it will help to control the cost for a while, since I will keep impressing for a low bid.