Package com.google.api.adwords.v201309.cm

Examples of com.google.api.adwords.v201309.cm.AdGroupCriterionOperation


      NegativeAdGroupCriterion ageRangeNegativeAdGroupCriterion = new NegativeAdGroupCriterion();
      ageRangeNegativeAdGroupCriterion.setAdGroupId(adGroupId);
      ageRangeNegativeAdGroupCriterion.setCriterion(ageRangeNegative);

      // Create operations.
      AdGroupCriterionOperation genderBiddableAdGroupCriterionOperation =
          new AdGroupCriterionOperation();
      genderBiddableAdGroupCriterionOperation.setOperand(genderBiddableAdGroupCriterion);
      genderBiddableAdGroupCriterionOperation.setOperator(Operator.ADD);

      AdGroupCriterionOperation ageRangeNegativeAdGroupCriterionOperation =
          new AdGroupCriterionOperation();
      ageRangeNegativeAdGroupCriterionOperation.setOperand(ageRangeNegativeAdGroupCriterion);
      ageRangeNegativeAdGroupCriterionOperation.setOperator(Operator.ADD);

      AdGroupCriterionOperation[] operations = new AdGroupCriterionOperation[] {
          genderBiddableAdGroupCriterionOperation, ageRangeNegativeAdGroupCriterionOperation};

      // Add ad group criteria.
View Full Code Here


      cpcBid.setBid(new Money(null, 1000000L));
      biddingConfig.setBids(new Bids[] {cpcBid});
      biddableAdGroupCriterion.setBiddingStrategyConfiguration(biddingConfig);

      // Create operations.
      AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
      operation.setOperand(biddableAdGroupCriterion);
      operation.setOperator(Operator.SET);

      AdGroupCriterionOperation[] operations = new AdGroupCriterionOperation[] {operation};

      // Update ad group criteria.
      AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(operations);
View Full Code Here

        // Create BiddableAdGroupCriterion.
        BiddableAdGroupCriterion bagc = new BiddableAdGroupCriterion();
        bagc.setAdGroupId(adGroupId);
        bagc.setCriterion(keyword);
        // Create AdGroupCriterionOperation.
        AdGroupCriterionOperation agco = new AdGroupCriterionOperation();
        agco.setOperand(bagc);
        agco.setOperator(Operator.ADD);
        // Add to list.
        operations.add(agco);
      }

      // You can specify up to 3 job IDs that must successfully complete before
View Full Code Here

      BiddableAdGroupCriterion placementBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
      placementBiddableAdGroupCriterion.setAdGroupId(adGroupId);
      placementBiddableAdGroupCriterion.setCriterion(placement);

      // Create operation.
      AdGroupCriterionOperation placementAdGroupCriterionOperation =
          new AdGroupCriterionOperation();
      placementAdGroupCriterionOperation.setOperand(placementBiddableAdGroupCriterion);
      placementAdGroupCriterionOperation.setOperator(Operator.ADD);

      AdGroupCriterionOperation[] operations =
          new AdGroupCriterionOperation[] {placementAdGroupCriterionOperation};

      // Add ad group criteria.
View Full Code Here

      BiddableAdGroupCriterion biddableAdGroupCriterion = new BiddableAdGroupCriterion();
      biddableAdGroupCriterion.setAdGroupId(adGroupId);
      biddableAdGroupCriterion.setCriterion(criterion);

      // Create operations.
      AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
      operation.setOperand(biddableAdGroupCriterion);
      operation.setOperator(Operator.SET);

      AdGroupCriterionOperation[] operations = new AdGroupCriterionOperation[] {operation};

      // Update ad group criteria.
      AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(operations);
View Full Code Here

        // Create BiddableAdGroupCriterion.
        BiddableAdGroupCriterion bagc = new BiddableAdGroupCriterion();
        bagc.setAdGroupId(adGroupId);
        bagc.setCriterion(placement);
        // Create AdGroupCriterionOperation.
        AdGroupCriterionOperation agco = new AdGroupCriterionOperation();
        agco.setOperand(bagc);
        agco.setOperator(Operator.ADD);
        // Add to list.
        operations.add(agco);
      }

      // You can specify up to 3 job IDs that must successfully complete before
View Full Code Here

      String query = String.format(
          "SELECT Id, AdGroupId, Status WHERE AdGroupId = %d AND Status = ACTIVE ORDER BY Id ",
          adGroupId);

      // Get all active ad group criteria.
      AdGroupCriterionPage page = adGroupCriterionService.query(query);

      // Display ad group criteria.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (AdGroupCriterion adGroupCriterion : page.getEntries()) {
          if (adGroupCriterion instanceof BiddableAdGroupCriterion) {
            BiddableAdGroupCriterion biddableAdGroupCriterion =
                (BiddableAdGroupCriterion) adGroupCriterion;
            System.out.println("Ad group criterion with ad group id \""
                + biddableAdGroupCriterion.getAdGroupId() + "\", criterion id \""
View Full Code Here

      // Get AdWordsUser from "~/adwords.properties".
      AdWordsUser user = new AdWordsUser();

      // Get the AdGroupCriterionService.
      AdGroupCriterionServiceInterface adGroupCriterionService =
          user.getService(AdWordsService.V201309.ADGROUP_CRITERION_SERVICE);

      Long adGroupId = Long.parseLong("INSERT_AD_GROUP_ID_HERE");

      String query = String.format(
          "SELECT Id, AdGroupId, Status WHERE AdGroupId = %d AND Status = ACTIVE ORDER BY Id ",
          adGroupId);

      // Get all active ad group criteria.
      AdGroupCriterionPage page = adGroupCriterionService.query(query);

      // Display ad group criteria.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (AdGroupCriterion adGroupCriterion : page.getEntries()) {
          if (adGroupCriterion instanceof BiddableAdGroupCriterion) {
View Full Code Here

      // Display ad group criteria.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (AdGroupCriterion adGroupCriterion : page.getEntries()) {
          if (adGroupCriterion instanceof BiddableAdGroupCriterion) {
            BiddableAdGroupCriterion biddableAdGroupCriterion =
                (BiddableAdGroupCriterion) adGroupCriterion;
            System.out.println("Ad group criterion with ad group id \""
                + biddableAdGroupCriterion.getAdGroupId() + "\", criterion id \""
                + biddableAdGroupCriterion.getCriterion().getId() + "\", type \""
                + biddableAdGroupCriterion.getCriterion().getCriterionType()
                + "\", and user status \"" + biddableAdGroupCriterion.getUserStatus()
                + "\" was found.");
          }
        }
      } else {
        System.out.println("No ad group criteria were found.");
View Full Code Here

          user.getService(AdWordsService.V201309.CAMPAIGN_SERVICE);

      long campaignId = Long.parseLong("INSERT_CAMPAIGN_ID_HERE");

      // Create campaign with updated budget.
      Campaign campaign = new Campaign();
      campaign.setId(campaignId);
      campaign.setStatus(CampaignStatus.PAUSED);

      // Create operations.
      CampaignOperation operation = new CampaignOperation();
      operation.setOperand(campaign);
      operation.setOperator(Operator.SET);
View Full Code Here

TOP

Related Classes of com.google.api.adwords.v201309.cm.AdGroupCriterionOperation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.