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

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


      adParam2.setCriterionId(keywordId);
      adParam2.setInsertionText("$40");
      adParam2.setParamIndex(2);

      // Create operations.
      AdParamOperation adParamOperation1 = new AdParamOperation();
      adParamOperation1.setOperand(adParam1);
      adParamOperation1.setOperator(Operator.SET);

      AdParamOperation adParamOperation2 = new AdParamOperation();
      adParamOperation2.setOperand(adParam2);
      adParamOperation2.setOperator(Operator.SET);

      AdParamOperation[] operations = new AdParamOperation[] {adParamOperation1, adParamOperation2};

      // Set ad parameters.
      AdParam[] adParams = adParamService.mutate(operations);
View Full Code Here


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

      // Get the AdParamService.
      AdParamServiceInterface adParamService =
          user.getService(AdWordsService.V201309.AD_PARAM_SERVICE);

      long adGroupId = Long.parseLong("INSERT_AD_GROUP_ID_HERE");
      long keywordId = Long.parseLong("INSERT_KEYWORD_ID_HERE");

      // Create ad params.
      AdParam adParam1 = new AdParam();
      adParam1.setAdGroupId(adGroupId);
      adParam1.setCriterionId(keywordId);
      adParam1.setInsertionText("100");
      adParam1.setParamIndex(1);

      AdParam adParam2 = new AdParam();
      adParam2.setAdGroupId(adGroupId);
      adParam2.setCriterionId(keywordId);
      adParam2.setInsertionText("$40");
      adParam2.setParamIndex(2);

      // Create operations.
      AdParamOperation adParamOperation1 = new AdParamOperation();
      adParamOperation1.setOperand(adParam1);
      adParamOperation1.setOperator(Operator.SET);

      AdParamOperation adParamOperation2 = new AdParamOperation();
      adParamOperation2.setOperand(adParam2);
      adParamOperation2.setOperator(Operator.SET);

      AdParamOperation[] operations = new AdParamOperation[] {adParamOperation1, adParamOperation2};

      // Set ad parameters.
      AdParam[] adParams = adParamService.mutate(operations);

      // Display ad parameters.
      if (adParams != null) {
        for (AdParam adParam : adParams) {
          System.out.println("Ad parameter with ad group id \"" + adParam.getAdGroupId()
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

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

          user.getService(AdWordsService.V201309.CAMPAIGN_SERVICE);

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

      // Create campaign with DELETED status.
      Campaign campaign = new Campaign();
      campaign.setId(campaignId);
      campaign.setStatus(CampaignStatus.DELETED);

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

    // https://developers.google.com/adwords/api/docs/appendix/platforms
    Platform mobile = new Platform();
    mobile.setId(30001L);

    CampaignCriterionOperation operation = new CampaignCriterionOperation();
    CampaignCriterion campaignCriterion = new CampaignCriterion();
    campaignCriterion.setCampaignId(campaignId);
    campaignCriterion.setCriterion(mobile);
    campaignCriterion.setBidModifier(1.5);
    operation.setOperand(campaignCriterion);
    operation.setOperator(Operator.SET);

    CampaignCriterionReturnValue result =
        campaignCriterionService.mutate(new CampaignCriterionOperation[] {operation});
View Full Code Here

    // Create mobile platform. The ID can be found in the documentation.
    // https://developers.google.com/adwords/api/docs/appendix/platforms
    Platform mobile = new Platform();
    mobile.setId(30001L);

    CampaignCriterionOperation operation = new CampaignCriterionOperation();
    CampaignCriterion campaignCriterion = new CampaignCriterion();
    campaignCriterion.setCampaignId(campaignId);
    campaignCriterion.setCriterion(mobile);
    campaignCriterion.setBidModifier(1.5);
    operation.setOperand(campaignCriterion);
    operation.setOperator(Operator.SET);

    CampaignCriterionReturnValue result =
        campaignCriterionService.mutate(new CampaignCriterionOperation[] {operation});

    // Display campaign criteria.
View Full Code Here

      NegativeCampaignCriterion negativeCampaignCriterion = new NegativeCampaignCriterion();
      negativeCampaignCriterion.setCampaignId(campaignId);
      negativeCampaignCriterion.setCriterion(keyword);

      // Create operations.
      CampaignCriterionOperation operation = new CampaignCriterionOperation();
      operation.setOperand(negativeCampaignCriterion);
      operation.setOperator(Operator.ADD);

      // Add campaign criteria.
      CampaignCriterionReturnValue result =
          campaignCriterionService.mutate(new CampaignCriterionOperation[] {operation});
View Full Code Here

    campaignCriterion.setCriterion(mobile);
    campaignCriterion.setBidModifier(1.5);
    operation.setOperand(campaignCriterion);
    operation.setOperator(Operator.SET);

    CampaignCriterionReturnValue result =
        campaignCriterionService.mutate(new CampaignCriterionOperation[] {operation});

    // Display campaign criteria.
    if (result != null && result.getValue() != null) {
      for (CampaignCriterion campaignCriterionResult : result.getValue()) {
        System.out.printf("Campaign criterion with campaign id '%s', criterion id '%s', "
            + "and type '%s' was modified with bid %.2f\n", campaignCriterionResult.getCampaignId(),
            campaignCriterionResult.getCriterion().getId(),
            campaignCriterionResult.getCriterion().getCriterionType(),
            campaignCriterionResult.getBidModifier());
View Full Code Here

TOP

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

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.