AdWords
5.3K members online now
5.3K members online now
Get started with AdWords - learn the basics to get set up for success
Guide Me
star_border
Reply

Monthly Budget

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

What is the easiest way to set up a monthly budget? I know that google says that your daily budget is 1.00$, then your daily budget will be that x 30, but what if I want a different daily budget then that. Some of the keywords I'm targeting are expensive, and I don't want to run them all month long. 

 

Right now, I'm aiming at 6.00$ a day, but I want something along the lines of 50$ a day budget. Do I need to set up an automated rule? I thought about pausing the campaign when the budget reaches < 50$, but is there a way to restart the campaign when the new month rolls around. 

 

 

1 Expert replyverified_user

Re: Monthly Budget

Participant ✭ ☆ ☆
# 2
Participant ✭ ☆ ☆
Hi Sam G

It may be possible to do this via the use of scripts. Or, with a little more work a flexible budget.

For example, if you want to spend only $50 to advertise and we want to advertise for 10 days, we could set a daily budget of $5 to use up the entire budget. However, this assumes that we will spend the entire amount each day AND we wish to spend it evenly. It's not possible to tell AdWords that you want to spend the bulk of your budget during the last few days.

A flexible budget script will dynamically adjust your campaign budget daily with a custom budget distribution scheme.

This sounds like it could be a good option for you.

Please see for more details of this https://developers.google.com/adwords/scripts/docs/solutions/flexible-budgets

Hope this helps a little

James Edward

Re: Monthly Budget

Top Contributor
# 3
Top Contributor

Hi Sam, if I'm reading your question correctly (and I think you may have mixed up some "daily" and "monthly" words in there), then @James Edw Goode suggestion of scripting would indeed be the best option.

 

The Script James linked to is a good start, but it weights the spend towards the end of the Campaign (I'm not sure why Google chose this as an example, it seems a very specific case to use).

 

I use a Script with fixed budget Campaigns that simply takes the amount you want to spend each month and then adjusts daily budgets for any number of Campaigns to try and hit that monthly spend.  For example, if you wanted to spend $300 in a 30-day month (nice easy math), your daily budget should be $10.  However, if your first 10 days spent only $50 in total, by the 11th day the Script would set the daily budget to $12.50 (because there's $250 remaining over 20 days = 250/20 = 12.5).  This script also allows you to distribute this fixed budget across multiple Campaigns using Labels as percentage indicators.  So you can allocate 40% of the budget to one Campaign and 60% to another (or you can just use a single "100" Label if you only have one Campaign).

 

The Script begins below my sig, PLEASE ensure you test it by previewing thoroughly before using and read the comments at the top.

 

Jon

 

/* Modified Flexible Budget Script © Jon Gritton 2014
** @param (number) TOTAL_BUDGET - the total sum to be spent in a single month
**
** Schedule to run around 1am (before "day" starts)

** NOTE: You MUST create a Label named "FlexBudget" and apply it to all Campaigns
** you wish to be controlled by this Script.

** You MUST create "percentage" Labels for each Campaign, using only numbers, e.g. 45
** and these must total 100. To apply to just one Campaign use a single Label 100.

** If you use other Labels in your Campaigns, add them to line 73 below
*/

//this is the total required spend for all Campaigns INCLUDING those not Labelled as "FlexBudget"
//If you wish to manage a set of Campaigns for a limited budget separate to others, you will need
//to amend the script to remove the calculation of "nonFlexDaily".

var TOTAL_BUDGET = 1200;

var d = new Date();
var thisMonth=d.getMonth();
var thisYear=d.getFullYear();
// DAYS_SO_FAR is -1 because "today" hasn't happened yet
var DAYS_SO_FAR = d.getDate() - 1;
var TOTAL_DAYS = daysInMonth(thisMonth + 1, thisYear);
var DAYS_REMAINING = TOTAL_DAYS - DAYS_SO_FAR;


var START_DATE = new Date(thisYear, thisMonth, 1);
var END_DATE = new Date(thisYear, thisMonth, TOTAL_DAYS);

function main() {
setNewBudget(calculateBudgetEvenly, TOTAL_BUDGET, START_DATE, END_DATE);
}

function setNewBudget(budgetFunction, totalBudget, start, end) {
var costSoFar = 0;
var campaignsToSet = [];
var nonFlexDaily = 0;
var campaigns = AdWordsApp.campaigns()
//affect only live Campaigns
.withCondition("Status = ENABLED")
.get();
while(campaigns.hasNext()) {
var campaign=campaigns.next();
var thisCost = campaign.getStatsFor(dateToString(start), dateToString(end)).getCost();
costSoFar += thisCost;
campLabels=campaign.labels()
//get only the labels for percentages
.withCondition('Name IN ["FlexBudget"]')
.get();
if(campLabels.hasNext()) {
//this campaign is a Flexbudget
campaignsToSet.push(campaign);
Logger.log("CampaignToSet: " + campaign.getName());
}
else {
//this campaign is manual but it's cost still needs to be counted
Logger.log("NonFlexCampaign: " + campaign.getName() + " Budget: " + campaign.getBudget());
nonFlexDaily += campaign.getBudget();
}
}
var totalCalcd = 0;
var nonFlexSpend = DAYS_REMAINING * nonFlexDaily;
Logger.log("CostSoFar: " + costSoFar);
totalBudget -= (nonFlexSpend + costSoFar);
Logger.log("Total available for Flex Campaigns for the rest of the month: " + totalBudget);
for(var i=0;i<campaignsToSet.length;i++) {
var thisCampaign=campaignsToSet[i];
cLabels=thisCampaign.labels()
// Ensure only the "percentage" Label is selected - you may need to add others if you use them
.withCondition("Name NOT_IN ['FlexBudget']")
.get();
var percentage = cLabels.next().getName();
//set the new budgets
var newBudget = budgetFunction(totalBudget, percentage);
newBudget=(newBudget>0)? newBudget : 1;
thisCampaign.setBudget(newBudget);
Logger.log("Campaign Set: " + thisCampaign.getName() + " Budget: " + newBudget);
}
}

function calculateBudgetEvenly(totalBudget, percentage) {
//set budget based upon percentage Label
var budgetRemaining = totalBudget*(percentage / 100);

if (DAYS_REMAINING <= 0) {
return budgetRemaining;
} else {
return budgetRemaining / DAYS_REMAINING;
}
}

function daysInMonth(month, year) {
//returns number of days in a given month of a given year
return new Date(year, month, 0).getDate();
}

function dateToString(date) {
return date.getFullYear() + zeroPad(date.getMonth() + 1) + zeroPad(date.getDate());
}

function zeroPad(n) {
if (n < 10) {
return '0' + n;
} else {
return '' + n;
}
}

AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits

Re: Monthly Budget

Participant ✭ ☆ ☆
# 4
Participant ✭ ☆ ☆
Perfect answer really posted by @conbut

Good Luck with this Sam G.

James

Re: Monthly Budget

Follower ✭ ✭ ✭
# 5
Follower ✭ ✭ ✭

Hi Sam G,

 

The use of the scripts will be good.

 

An alternative is to use the Automate Rules function and have your campaign/ad group/ad/keyword pause if it exceeds a set price point. You create this function to run every hour on the hour, or less frequently. You can also have a limit based on daily cost, or weekly, monthly, etc. to control how much is spent in a given time frame.

 

Setting Up Automated Rules

 

Creating Rules

 

 

 

 

 

Re: Monthly Budget

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭
Awesome guys, thanks for all the helpful responses.

George, is there a way to create a rule that says at the beginning of each month, the ad unpauses. I think I figured it out, you have the campaign pause when the cost > 50$, it checks daily, but uses data from the same month. So every day when it checks it stays paused because the total cost has exceeded 50$, but once the new month starts, that number is 0 and it should restart?

Re: Monthly Budget

[ Edited ]
Follower ✭ ✭ ✭
# 7
Follower ✭ ✭ ✭

Hi Sam,

I think you have it right.

I have not tried it, but that should work. There is another option to use data from the last 30 days which should not reset the monthly total on the 1st of each month, so what you have planned should theoretically work they way you are expecting it to: to begin each 1st day of the month to see if the month of that day has > $50 cost, not matter what just happened on the previous 30-31 days.

Re: Monthly Budget

Top Contributor
# 8
Top Contributor

Hi Sam,

 

If you use any kind of script or automation to pause a Campaign when it reaches a certain level, yes, you'll need another rule to re-enable it on the 1st.  You could do this within a script but the easiest way if via an Automated Rule.

 

George, just FYI, Automated Rules cannot be set to run hourly.  Their highest frequency is daily, which is why Scripts are more appropriate for things like budget control.

 

Jon

AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits

Re: Monthly Budget

[ Edited ]
Follower ✭ ✭ ✭
# 9
Follower ✭ ✭ ✭

Hi Jon,

You are correct that the Automated Rules highest frequency is indeed daily. However, you can have still have hourly checks.

To have Automated hourly checks you would simply create up to 24 more rules of the same criteria to run at every hour you want to the automation to check.

Tedious, but that is how to set up hourly Automated Rules.

Re: Monthly Budget

[ Edited ]
Visitor ✭ ✭ ✭
# 10
Visitor ✭ ✭ ✭

@Jon_Gritton Hi Jon, (forgive me the bad english, I'm using Google translator)

I use your script, flexbudget, it's fantastic, great, but I have a problem.

It calculates the month taking into account every day, but most of my accounts work Monday through Friday, or only on weekdays.

Is there any solution for this?