Forums Forums White Hat SEO PPC Google Ads Budget/Spend & Ad Scheduling

  • PPC

    Google Ads Budget/Spend & Ad Scheduling

    Posted by seohelper on May 7, 2021 at 2:22 pm

    I understand that Google can spend up to double your daily budget, but your monthly spend will not be higher than your avg daily budget * 30.4. However, how do you calculate your daily budget if your campaigns are only set to show on weekends? If I have my daily budget set higher to account for not showing all days, will Google still try and spend that daily amount * 30.4 which would lead to overspend?

    CORosh replied 3 years ago 1 Member · 1 Reply
  • 1 Reply
  • CORosh

    Guest
    May 7, 2021 at 3:36 pm

    Here is the script that will help you stay within your daily budget. Again this is not a sure-shot method but will give you some peace. Also, I have created a rule which is if the spend is above X$ then send me an email, this way I have full control before the script kicks in

    function main() {

      var allowedOverdeliveryPercentage = 0.3; // set percentage as decimal, i.e. 20% should be set as 0.2
      var labelName = “paused by overdelivery checker script”;

      AdWordsApp.createLabel(labelName, “automatic label needed to reenable campaigns”);

      var campaigns = AdWordsApp.campaigns()
       .withCondition(“Status = ENABLED”)
       .withCondition(“Cost > 0”)
       .forDateRange(“TODAY”);

      var campaignIterator = campaigns.get();

      while (campaignIterator.hasNext()) {
        var campaign = campaignIterator.next();
        var campaignName = campaign.getName();
        var budgetAmount = campaign.getBudget().getAmount();
        var costToday = campaign.getStatsFor(“TODAY”).getCost();

        if(costToday > budgetAmount * (1 + allowedOverdeliveryPercentage)) {
          Logger.log(campaignName + ” has spent ” + costToday + ” which is more than allowed.”);
          campaign.applyLabel(labelName);
          campaign.pause();
        } else {
          Logger.log(campaignName + ” has spent ” + costToday + ” and can continue to run.”);
        }
      }

    }

Log in to reply.