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

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


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

          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

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

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

      // Display campaign criteria.
      if (result != null && result.getValue() != null) {
        for (CampaignCriterion campaignCriterionResult : result.getValue()) {
          System.out.println("Campaign criterion with campaign id \""
              + campaignCriterionResult.getCampaignId() + "\", criterion id \""
              + campaignCriterionResult.getCriterion().getId() + "\", and type \""
              + campaignCriterionResult.getCriterion().getCriterionType() + "\" was added.");
        }
View Full Code Here

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

    // Get the CampaignCriterionService.
    CampaignCriterionServiceInterface campaignCriterionService =
        user.getService(AdWordsService.V201309.CAMPAIGN_CRITERION_SERVICE);

    long campaignId = Long.parseLong("INSERT_CAMPAIGN_ID_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.
    if (result != null && result.getValue() != null) {
      for (CampaignCriterion campaignCriterionResult : result.getValue()) {
        System.out.printf("Campaign criterion with campaign id '%s', criterion id '%s', "
View Full Code Here

TOP

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

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.