Hourly Bid Script

476 views
Skip to first unread message

Lauren

unread,
Nov 5, 2015, 2:27:27 PM11/5/15
to AdWords Scripts Forum
I am trying to use the Brainlabs hourly bid script here: http://searchengineland.com/adwords-bidding-thats-4-times-responsive-google-marin-kenshoo-207877.

Right now the script runs w/o any errors and it deletes all my current bid adjustments, but then it only adds the new bid adjustment for the current hour. For example, if my bid adjustment for Friday at 2pm is 125% and I run the script on Friday at 2pm it will set my all-day Friday adjustment to +25%. Is that how it is supposed to work? I figured this would work if I had the script frequency at hourly, but when I do that the script runs on every half hour (aka 2:30pm) instead of the full hour (2pm), so that won't work.

If anyone knows what is going on I'd really appreciate the help. Thanks!

Tyler Sidell (AdWords Scripts Team)

unread,
Nov 5, 2015, 3:57:14 PM11/5/15
to AdWords Scripts Forum
Hi Lauren,

The AdWords Scripts HOURLY frequency is set to run within the hour and not exactly on the hour.  So the script could run, if set to HOURLY, at 2:30 then 3:30 then 4:30, etc.  I would suggest factoring that in and adjust the bids and the spreadsheet accordingly.

Thanks,
Tyler Sidell
AdWords Scripts Team

Lauren

unread,
Nov 11, 2015, 6:24:21 PM11/11/15
to AdWords Scripts Forum
Thanks Tyler! We adjusted the bids, but have now run into another error.

I was testing the script on just one campaign and now that I have debugged it, I wanted to apply it to several. When I add in a few campaign names and run the script preview it said no campaigns existed. I tried separating the campaigns names like the below with no luck either. 

 var includeCampaignNameContains = "campaign1, campaign2, campaign3";
 var includeCampaignNameContains = "campaign1,campaign2,campaign3";
 var includeCampaignNameContains = "campaign1" "campaign2" "campaign3;

I also tried adding something like 'HOURSCRIPT' or '%hourly%' into the campaign names and only including campaigns with those words in the script. That gets the script to acknowledge 1 of the campaigns that I want to use it on, but I can't figure out a way to get it to apply to all the campaigns that have the 'HOURSCRIPT' on them. Do you know what I can change that will fix this?

Thanks,
Lauren

AussieWeb Conversion

unread,
Nov 12, 2015, 2:19:53 AM11/12/15
to AdWords Scripts Forum
Hi Lauren

You'll need to change a couple of things, most importantly the line
.withCondition('Name CONTAINS_IGNORE_CASE "' + includeCampaignNameContains + '"');


as that just checks for one phrase.  It would probably need to use a CONTAINS_ANY and have the correct quotes & array syntax.  eg
.withCondition("Name CONTAINS_ANY ['Xmas', 'New Year']");


I'm not sure if there's a CONTAINS_ANY_IGNORE_CASE though.   For more info please refer to
https://developers.google.com/adwords/scripts/docs/reference/adwordsapp/adwordsapp_campaignselector#withCondition_1

I'd try (though I've not tested this)
var includeCampaignNameContains = "'campaign1', 'campaign2', 'campaign3'";

and then lower down in the selector
.withCondition("Name CONTAINS_ANY [" + includeCampaignNameContains + "]");


Regards
Nigel

Tyler Sidell (AdWords Scripts Team)

unread,
Nov 12, 2015, 10:12:45 AM11/12/15
to AdWords Scripts Forum
Thanks Nigel for providing the suggestion.

Lauren, please let us know if you are still running into issues and we'll be more than glad to assist.

Cheers,
Tyler Sidell
AdWords Scripts Team

Lauren

unread,
Nov 12, 2015, 10:39:21 AM11/12/15
to AdWords Scripts Forum
Thanks to both of you! Unfortunately there are still errors. I tried this and other things like finding the campaigns via a label or a campaign ID, but I'm still getting errors or the bid adjustment still only applies to 1 of the 3 campaigns. When I implemented Nigel's idea, I get the error below:

Invalid or inapplicable operator is used for field Name. Please check the supported operators. (line 72)

**LINE 72 IS: while(campaignIterator.hasNext()){

Tyler Sidell (AdWords Scripts Team)

unread,
Nov 12, 2015, 4:47:11 PM11/12/15
to AdWords Scripts Forum
Hi Lauren,

Would you be able to send me your CID (reply privately to the author) along with the name of the script so that I can take a look and troubleshoot exactly what is causing this error?

Thanks,
Tyler Sidell
AdWords Scripts Team

Lauren

unread,
Nov 12, 2015, 5:00:54 PM11/12/15
to AdWords Scripts Forum
Tyler -- Did you get my private message? I couldn't tell if it sent.
Reply all
Reply to author
Forward
0 new messages