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

Ads
5.2K members online now
5.2K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

Pause Campaigns When Total Spend = X Amount

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi there,

 

I need to be able to pause certain campaigns after they have spent X Amount of money (Cost of all campaigns combined >= X amount)

 

Given:

 

10 campaigns.

1 budget.

One account with one active Booking Order.

 

Limitations:

 

- Automated rules cannot look at the cost of all campaigns combined together.

- I can bring only one active Booking Order at a time while the account is active for multiple campaigns (BO amount = amount used for all the active campaigns).

- Unable to check my budget management sheet every morning to check the total spend (life time spend).

- Shared Budgets look at Daily spend not life time spend.

 

Basically, i need to rely on this script/rule or any workaround in case i was not able to update my budgets on daily bases and to eliminate the chances to overspend when i don't have enough time to do daily management.

 

Thanks,

Rayan

 

 

1 Expert replyverified_user

Re: Pause Campaigns When Total Spend = X Amount

Top Contributor
# 2
Top Contributor

Hi Rayan,

 

Automated Rules should be able to do this; you can set a Rule to run on "selected" Campaigns (select the Campaigns you want the rule to run on before clicking the Automate button), or on all Enabled Campaigns, then use a Label as a condition in the rule (having labelled the Campaigns you want affected).

 

However, Rules do have the limitation that they can only run once per day and that may not be precise enough, so I would tend to use a Script.  Scripts could handle this task very easily, and could be set to run hourly, giving much more precision.

 

The example script here, although not exactly what you want, contains much of the required coding, methods and procedures for handling budgets and limits and should give you a head start in writing your own.

 

https://developers.google.com/adwords/scripts/docs/solutions/flexible-budgets

 

Jon

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

Re: Pause Campaigns When Total Spend = X Amount

Participant ✭ ☆ ☆
# 3
Participant ✭ ☆ ☆
Hi Rayan

I am under the impression automated rules should allow you to do this, as pointed out by Cobnut. Labeling should be the easiest way to achieve this.

There are quite a few resources online about scripts, and budget rules.

Freeadwordscripts have kindly provided the following script, which I believe can be tailored to suit your needs.

http://www.freeadwordsscripts.com/2013/03/dynamically-adjust-campaign-budgets.html

The above link to the developers API should be a great starting point with elements from the freeadwordsscripts link above.

Good luck and best wishes

James Edward

Re: Pause Campaigns When Total Spend = X Amount

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Even with Filters, still the rule doesnt look at the the cost of the x number of campaigns combined (doesnt sum up the cost coming in from campaign 1 + campaign 2 + campaign 3...etc). What happens is that the rule looks at the cost of each of the campaigns, and whichever meets the requirement (cost >= amount x) it pauses it individually leaving the other campaigns running.

Re: Pause Campaigns When Total Spend = X Amount

Follower ✭ ✭ ✭
# 5
Follower ✭ ✭ ✭
I'm having this same issue. Some things might have changed in AdWords since the above solutions were given. For example, there is no option in the dropdown next to "Requirements" for Label. However, there are Campaign and Campaign Name options. What's the difference between Campaign and Campaign Name?

Thanks.

Re: Pause Campaigns When Total Spend = X Amount

Explorer ✭ ☆ ☆
# 6
Explorer ✭ ☆ ☆

Hi @onbeta

I'm not sure about where you looked for the labels:
Here is a snapshot:
1.jpg


Regarding the campaign vs campaign name:
Campaign is for selecting specific campaigns from your existing ones.
Campaign Name is for condition which campaigns to include. For example: campaign name contains the text "shirts". In this case all campaigns with the text "shirts" anywhere in their names will be included in the rule.

As for the original post issue, since you have the same issue, you can use a script to pause active campaigns if a certain budget is reached:

function main() {
  
  // GET THE TOTAL SPEND OF THE ACCOUNT
  var costReport = AdWordsApp.report("Select Cost from ACCOUNT_PERFORMANCE_REPORT");

  var reportRow = costReport.rows().next();
  var totalCost = reportRow["Cost"].replace(',', ''); // Remove thousand separator
  
  // PAUSE THE ACTIVE CAMPAIGNS IF THE BUDGET IS REACHED. REPLACE "XXXX" WITH YOUR BUDGET.
  if (totalCost > XXXX){
    var campaignIterator = AdWordsApp.campaigns().withCondition("Status = ENABLED").get();

    while (campaignIterator.hasNext()){
      var campaign = campaignIterator.next();
      campaign.pause();
    }
  }
}


NOTE: this script will pause all active campaigns if a budget was reached during ALL TIME of activity.
To change the time configuration, a DURING condition has to be added to the Select statement, e.g:

  var costReport = AdWordsApp.report("Select Cost from ACCOUNT_PERFORMANCE_REPORT DURING LAST_30_DAYS");

 

 Hope that helps.

Re: Pause Campaigns When Total Spend = X Amount

Follower ✭ ✭ ✭
# 7
Follower ✭ ✭ ✭
Hi Arik,

Thanks very much. I don't know why I didn't get the "Labels" choicde in the dropdown - I was looking in the same place. However, your script is a better option.
Maybe I should have been clear from the start about what I wanted to do, which was:

When the total cost for the day reaches $x, pause all enabled campaigns.
Re-start all enabled campaigns the next day at 12:00 AM.
When that day's cost reaches $x, pause.
And so on.

What should the DURING condition be for the same day?

Thanks.

Re: Pause Campaigns When Total Spend = X Amount

Top Contributor
# 8
Top Contributor

Hi @onbeta for figures for today, use TODAY, so the line would be:

 

var costReport = AdWordsApp.report("Select Cost from ACCOUNT_PERFORMANCE_REPORT DURING TODAY");

Jon

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

Re: Pause Campaigns When Total Spend = X Amount

[ Edited ]
Explorer ✭ ☆ ☆
# 9
Explorer ✭ ☆ ☆

Thanks, @Jon_Gritton.

Re: Pause Campaigns When Total Spend = X Amount

Top Contributor
# 10
Top Contributor

Hey @Arik no worries, I can't have you stealing all the script questions Smiley Happy

 

Jon

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