PMAX campaign didnt stop by script

46 views
Skip to first unread message

NIÈME CONSEIL

unread,
Jul 4, 2022, 4:47:00 AM7/4/22
to Google Ads Scripts Forum
hi plz im using this script to manage campagns 
function main() {
  function campagnpause(){
  const campaignIterator = AdsApp.campaigns()
      .withCondition(`campaign.name = "Leads-PerformanceTEST"`)
      .get();
  if (campaignIterator.hasNext()) {
    const campaign = campaignIterator.next();
    // You can also request reports for pre-defined date ranges. See
    // https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_campaign#getStatsFor_1,
    // DateRangeLiteral section for possible values.
    if(campaign.getCost()>1000){
      campaign.pause();
       console.log(`ok`);
    }
   
  } else {
   console.log(`No campaign named  found`);
  }
  }
  campagnpause();


But the script work in other campagne not PMAX Campagne !!!!
 can some body help me 

Google Ads Scripts Forum Advisor

unread,
Jul 4, 2022, 9:59:47 PM7/4/22
to adwords...@googlegroups.com

Hello,

I’m James from the Google Ads scripts support team. Thank you for raising your concern to us.

I’m afraid that the Performance max campaigns are not yet supported by the campaign selector or any selector within Google ads scripts, which is the main reason why you observed that your current script works with your other campaigns but not for your PMAX campaign.

Having said that, it is not possible yet to mutate any performance max campaign available on your account via Google Ads scripts. Instead, you can only retrieve that type of campaign using Ads script reporting along with campaign report type.

Regards,

Google Logo
James Howell
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2cFvLl:ref
Reply all
Reply to author
Forward
0 new messages