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

Examples of com.google.api.ads.adwords.jaxws.v201309.cm.BiddableAdGroupCriterion


      Keyword keyword = new Keyword();
      keyword.setText(text);
      keyword.setMatchType(KeywordMatchType.BROAD);

      // 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);
View Full Code Here


        adWordsServices.get(session, AdGroupCriterionServiceInterface.class);

    // https://developers.google.com/adwords/api/docs/appendix/genders
    Gender male = new Gender();
    male.setId(10L);
    BiddableAdGroupCriterion genderBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
    genderBiddableAdGroupCriterion.setAdGroupId(adGroupId);
    genderBiddableAdGroupCriterion.setCriterion(male);

    // https://developers.google.com/adwords/api/docs/appendix/ages
    AgeRange undetermined = new AgeRange();
    undetermined.setId(503999L);
    NegativeAdGroupCriterion ageRangeNegativeAdGroupCriterion = new NegativeAdGroupCriterion();
View Full Code Here

    // Create ad group criterion with updated bid.
    Criterion criterion = new Placement();
    criterion.setId(placementId);

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

    // Create bids.
    BiddingStrategyConfiguration biddingStrategyConfiguration = new BiddingStrategyConfiguration();
    CpmBid bid = new CpmBid();
    bid.setBid(new Money(null, 10000000L));
    biddingStrategyConfiguration.setBids(new Bids[] {bid});
    biddableAdGroupCriterion.setBiddingStrategyConfiguration(biddingStrategyConfiguration);

    // 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);

    // Display ad group criteria.
    for (AdGroupCriterion adGroupCriterionResult : result.getValue()) {
      if (adGroupCriterionResult instanceof BiddableAdGroupCriterion) {
        biddableAdGroupCriterion = (BiddableAdGroupCriterion) adGroupCriterionResult;
        System.out.println("Ad group criterion with ad group id \""
            + biddableAdGroupCriterion.getAdGroupId()
            + "\", criterion id \""
            + biddableAdGroupCriterion.getCriterion().getId()
            + "\", type \""
            + biddableAdGroupCriterion.getCriterion().getCriterionType()
            + "\", and bid \""
            + ((CpmBid) biddableAdGroupCriterion.getBiddingStrategyConfiguration().getBids()[0])
                .getBid().getMicroAmount() + "\" was updated.");
      }
    }
  }
View Full Code Here

    placement1.setUrl("http://mars.google.com");
    Placement placement2 = new Placement();
    placement2.setUrl("http://example.com/pluto");

    // Create biddable ad group criterion.
    BiddableAdGroupCriterion placementBiddableAdGroupCriterion1 = new BiddableAdGroupCriterion();
    placementBiddableAdGroupCriterion1.setAdGroupId(adGroupId);
    placementBiddableAdGroupCriterion1.setCriterion(placement1);

    // You can optionally provide these field(s).
    placementBiddableAdGroupCriterion1.setUserStatus(UserStatus.PAUSED);
    placementBiddableAdGroupCriterion1.setDestinationUrl("http://example.com/mars");
    BiddingStrategyConfiguration biddingStrategyConfiguration = new BiddingStrategyConfiguration();
    CpmBid bid = new CpmBid();
    bid.setBid(new Money(null, 10000000L));
    bid.setCpmBidSource(BidSource.CRITERION);
    biddingStrategyConfiguration.setBids(new Bids[] {bid});
    placementBiddableAdGroupCriterion1.setBiddingStrategyConfiguration(
        biddingStrategyConfiguration);

    NegativeAdGroupCriterion placementNegativeAdGroupCriterion2 = new NegativeAdGroupCriterion();
    placementNegativeAdGroupCriterion2.setAdGroupId(adGroupId);
    placementNegativeAdGroupCriterion2.setCriterion(placement2);
View Full Code Here

      Keyword keyword = new Keyword();
      keyword.setText(keywordText);
      keyword.setMatchType(KeywordMatchType.BROAD);

      // Create biddable ad group criterion.
      BiddableAdGroupCriterion keywordBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
      keywordBiddableAdGroupCriterion.setAdGroupId(adGroupId);
      keywordBiddableAdGroupCriterion.setCriterion(keyword);

      // Create operation.
      AdGroupCriterionOperation keywordAdGroupCriterionOperation =
          new AdGroupCriterionOperation();
      keywordAdGroupCriterionOperation.setOperand(keywordBiddableAdGroupCriterion);
View Full Code Here

      }
      Placement placement = new Placement();
      placement.setUrl(url);

      // 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);
View Full Code Here

      // Create placement
      Placement placement = new Placement();
      placement.setUrl(url);

      // Create biddable ad group criterion.
      BiddableAdGroupCriterion placementBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
      placementBiddableAdGroupCriterion.setAdGroupId(adGroupId);
      placementBiddableAdGroupCriterion.setCriterion(placement);

      // Create operation.
      AdGroupCriterionOperation placementAdGroupCriterionOperation =
          new AdGroupCriterionOperation();
      placementAdGroupCriterionOperation.setOperand(placementBiddableAdGroupCriterion);
View Full Code Here

    System.out.println("Ad group with name \"" + adGroup.getName() + "\" and id \""
        + adGroup.getId() + "\" was updated for the experiment.");

    // Set ad group criterion for the experiment.
    BiddableAdGroupCriterion adGroupCriterion = new BiddableAdGroupCriterion();
    adGroupCriterion.setCriterion(new Criterion(criterionId, null, null));
    adGroupCriterion.setAdGroupId(adGroupId);

    // Create experiment bid multiplier rule that will modify ad group bid for
    // the experiment.
    ManualCPCAdGroupCriterionExperimentBidMultiplier adGroupCriterionExperimentBidMultiplier =
        new ManualCPCAdGroupCriterionExperimentBidMultiplier();
    adGroupCriterionExperimentBidMultiplier.setMaxCpcMultiplier(new BidMultiplier(1.5, null));

    // Set experiment data to the ad group.
    BiddableAdGroupCriterionExperimentData adGroupCriterionExperimentData =
        new BiddableAdGroupCriterionExperimentData();
    adGroupCriterionExperimentData.setExperimentId(experimentId);
    adGroupCriterionExperimentData.setExperimentDeltaStatus(ExperimentDeltaStatus.MODIFIED);
    adGroupCriterionExperimentData
        .setExperimentBidMultiplier(adGroupCriterionExperimentBidMultiplier);
    adGroupCriterion.setExperimentData(adGroupCriterionExperimentData);

    // Create operation.
    AdGroupCriterionOperation adGroupCriterionOperation = new AdGroupCriterionOperation();
    adGroupCriterionOperation.setOperand(adGroupCriterion);
    adGroupCriterionOperation.setOperator(Operator.SET);

    // Update ad group criterion.
    adGroupCriterion =
        (BiddableAdGroupCriterion) adGroupCriterionService.mutate(
            new AdGroupCriterionOperation[] {adGroupCriterionOperation}).getValue()[0];

    System.out.println("Ad group criterion with ad group id \"" + adGroupCriterion.getAdGroupId()
        + "\" and criterion id \"" + adGroupCriterion.getCriterion().getId()
        + "\" was updated for the experiment.");
  }
View Full Code Here

    // Create ad group criterion with updated bid.
    Criterion criterion = new Criterion();
    criterion.setId(keywordId);

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

    // Create bids.
    BiddingStrategyConfiguration biddingStrategyConfiguration = new BiddingStrategyConfiguration();
    CpcBid bid = new CpcBid();
    bid.setBid(new Money(null, 10000000L));
    biddingStrategyConfiguration.setBids(new Bids[] {bid});
    biddableAdGroupCriterion.setBiddingStrategyConfiguration(biddingStrategyConfiguration);

    // 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);

    // Display ad group criteria.
    for (AdGroupCriterion adGroupCriterionResult : result.getValue()) {
      if (adGroupCriterionResult instanceof BiddableAdGroupCriterion) {
        biddableAdGroupCriterion = (BiddableAdGroupCriterion) adGroupCriterionResult;
        System.out.println(
            "Ad group criterion with ad group id \""
                + biddableAdGroupCriterion.getAdGroupId() + "\", criterion id \""
                + biddableAdGroupCriterion.getCriterion().getId() + "\", type \""
                + biddableAdGroupCriterion.getCriterion().getCriterionType()
                + "\", and bid \""
                + ((CpcBid) biddableAdGroupCriterion.getBiddingStrategyConfiguration()
                    .getBids()[0]).getBid().getMicroAmount() + "\" was updated.");
      }
    }
  }
View Full Code Here

    Keyword keyword2 = new Keyword();
    keyword2.setText("pluto");
    keyword2.setMatchType(KeywordMatchType.EXACT);

    // Create biddable ad group criterion.
    BiddableAdGroupCriterion keywordBiddableAdGroupCriterion1 = new BiddableAdGroupCriterion();
    keywordBiddableAdGroupCriterion1.setAdGroupId(adGroupId);
    keywordBiddableAdGroupCriterion1.setCriterion(keyword1);

    // You can optionally provide these field(s).
    keywordBiddableAdGroupCriterion1.setUserStatus(UserStatus.PAUSED);
    keywordBiddableAdGroupCriterion1.setDestinationUrl("http://example.com/mars");
    BiddingStrategyConfiguration biddingStrategyConfiguration = new BiddingStrategyConfiguration();
    CpcBid bid = new CpcBid();
    bid.setBid(new Money(null, 10000000L));
    biddingStrategyConfiguration.setBids(new Bids[] {bid});
    keywordBiddableAdGroupCriterion1.setBiddingStrategyConfiguration(biddingStrategyConfiguration);

    NegativeAdGroupCriterion keywordNegativeAdGroupCriterion2 = new NegativeAdGroupCriterion();
    keywordNegativeAdGroupCriterion2.setAdGroupId(adGroupId);
    keywordNegativeAdGroupCriterion2.setCriterion(keyword2);
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.jaxws.v201309.cm.BiddableAdGroupCriterion

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.