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
4.3K members online now
4.3K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

Enable a campain with automated rules based on another campaign status

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm trying to create a automated rule to enable a campaign when another gets paused. But I'm a bit confused about how to do it.

 

Specifically, what I want to do is:

 

When campaign A cost is X ==> Pause campaign A

When campaign A is paused ==> Enable campaign B

 

How can I do it ?

1 Expert replyverified_user

Re: Enable a campain with automated rules based on another campaign st

Top Contributor
# 2
Top Contributor

Hi mcc, I don't think there's any way to reference one Campaign from another in Automated Rules but you could certainly do this via Scripts, although that will require some programming knowledge.

 

Can I ask why you'd want to do this?  There may be a different solution.

 

AdWords Scripts

 

Jon

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

Re: Enable a campain with automated rules based on another campaign st

Follower ✭ ✭ ✭
# 3
Follower ✭ ✭ ✭

If I may add here : you can create 2 rules :

 

1) "Pause campaign 1" when variable "Cost" is above a threshold, that is easy but you must select data from "today" instead of "yesterday" and you must choose an hour at which to check the cost. If you need to check every hour, you can create 23 rules ( why not 24 , because hour 00:00 is the same with 24:00 )

 

2) "Enable campaign 2" when "Campaign name" IS "Campaign 1" ( of course you change the name of the paused campaign here ) AND a second validation "Cost">"your threshold". Again use the data from "same day" and decide a proper hour to check this or create 23 rules with the same structure. 

 

Let's hope that the second rule checks if the first campaign has a high cost and it enables because it can also be interpreted that the "Campaign name" is a condition for the selected campaign (which is campaign 2 )

 

By the way : Google people, when are you going to add the possibility for automatic rules to be executed repeatedly every hour ?

Re: Enable a campain with automated rules based on another campaign st

Top Contributor
# 4
Top Contributor

Hi Automatic K, can you detail the steps you would take to create the second rule?  As far as I can see there's no way for a rule to act on one single Campaign and test another.  Although you can specify Campaigns and other options, I believe those options - such as testing spend - are against the selected Campaign, not the Campaign chosen by the "Campaign Name" option in Requirements,

 

Doing this by a script would be failsafe and could run every few minutes if need be.  Scripting really is the better solution for this particular case and, I believe, it is the ability of Scripts to run very frequently that removes the requirement for Automated Rules to run in this way.

 

Jon

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

Re: Enable a campain with automated rules based on another campaign st

[ Edited ]
Follower ✭ ✭ ✭
# 5
Follower ✭ ✭ ✭

Yes scripts are the better solution, unfortunately I could not find a link with a ready made script for his task. I believed that the "Apply to" refers to "Campaign 1" and the "Requirements" set of AND conditions can apply to something else like "Campaign 2" , does the AdWords documentation explain if Requirements can use any other data except data related to the "apply to" campaign or ad group or keyword ?

Re: Enable a campain with automated rules based on another campaign st

Top Contributor
# 6
Top Contributor

It's certainly not clear exactly how the requirements link to the selected Campaign, I'll admit I'm working off of my programmers "feel" for how these things are likely to work.


I'll try and get some expert advice on the matter and report back.

 

As far as Scripts go, there's probably no "ready-made" solution but it should be a relatively simple task for any JavaScript programmer to modify one of the existing Scripts.  If I had time, I'd write one myself.

 

Jon

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

Re: Enable a campain with automated rules based on another campaign st

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

Ok, I managed to make the first part, which you need to schedule the script to run "every hour".

You can test it with the "preview" button on the script , it will show in the "logger" that the status will change . You have to authorize the "scripts" to handle your account.

 

function main() {
  // Replace Campaign1 with the name of your campaign which needs to be paused when a spending has been reached. You can unpause it manually or with an automated rule every day.
  var campaignName = "Campaign1";

  var campaignsIterator = AdWordsApp.campaigns()
      .withCondition("Name = '" + campaignName + "'")
  // replace 500 with your cost threshold
  .withCondition("Cost  > 500")
      .forDateRange("TODAY")
                  .get();

  if (campaignsIterator.hasNext()) {
    var campaign = campaignsIterator.next();
        
    campaign.pause();
  } else {
    Logger.log("Campaign '" + campaignName + "' not found.");
  }
}

Re: Enable a campain with automated rules based on another campaign st

Top Contributor
# 8
Top Contributor

Hi Automatic, good start...  That's not quite what the original poster was after, but it's most of the way there.  (By the way, I'm saying this just by reading the code, not actually testing it so I may make errors Smiley Happy ).

 

What you probably need in there is a flag within the loop such that if the condition with the first Campaign proves true (i.e. it's reached the required spend limit) then the flag is set.  I'd then use this flag in a separate conditional that would enable the second Campaign.

 

As you say, I'd then use Automated Rules to "reset" the two Campaigns each day/early morning, whenever.

 

Of course, all this is still dependent upon my question to the original poster about why they'd want to do this.  There may still be a better option, although playing with Scripts is always fun Smiley Happy

 

Jon

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