Examples of ExperimentServiceInterface


Examples of com.google.api.ads.adwords.axis.v201306.cm.ExperimentServiceInterface

  }

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, Long experimentId) throws Exception {
    // Get the ExperimentService.
    ExperimentServiceInterface experimentService =
        adWordsServices.get(session, ExperimentServiceInterface.class);

    // Create experiment with PROMOTED status.
    Experiment experiment = new Experiment();
    experiment.setId(experimentId);
    experiment.setStatus(ExperimentStatus.PROMOTED);

    // Create operation.
    ExperimentOperation operation = new ExperimentOperation();
    operation.setOperand(experiment);
    operation.setOperator(Operator.SET);

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

    // Promote experiment.
    ExperimentReturnValue result = experimentService.mutate(operations);

    // Display experiments.
    for (Experiment experimentResult : result.getValue()) {
      System.out.println("Experiment with name \"" + experimentResult.getName() + "\" and id \""
          + experimentResult.getId() + "\" was promoted.");
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201306.cm.ExperimentServiceInterface

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, Long campaignId, Long adGroupId,
      Long criterionId) throws Exception {
    // Get the ExperimentService.
    ExperimentServiceInterface experimentService =
        adWordsServices.get(session, ExperimentServiceInterface.class);

    // Get the AdGroupService.
    AdGroupServiceInterface adGroupService =
        adWordsServices.get(session, AdGroupServiceInterface.class);

    // Get the AdGroupCriterionService.
    AdGroupCriterionServiceInterface adGroupCriterionService =
        adWordsServices.get(session, AdGroupCriterionServiceInterface.class);

    // Create experiment.
    Experiment experiment = new Experiment();
    experiment.setCampaignId(campaignId);
    experiment.setName("Interplanetary Experiment #" + System.currentTimeMillis());
    experiment.setQueryPercentage(10);
    experiment.setStartDateTime(new DateTime().plusDays(1).toString("yyyyMMdd HHmmss Z"));

    // You can optionally provide these field(s).
    experiment.setEndDateTime(new DateTime().plusDays(30).toString("yyyyMMdd HHmmss Z"));

    // Create operation.
    ExperimentOperation experimentOperation = new ExperimentOperation();
    experimentOperation.setOperand(experiment);
    experimentOperation.setOperator(Operator.ADD);

    // Add experiment.
    ExperimentReturnValue result =
        experimentService.mutate(new ExperimentOperation[] {experimentOperation});

    for (Experiment experimentResult : result.getValue()) {
      System.out.println("Experiment with name \"" + experimentResult.getName() + "\" and id \""
          + experimentResult.getId() + "\" was added.");
    }
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201309.cm.ExperimentServiceInterface

  }

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, Long experimentId) throws Exception {
    // Get the ExperimentService.
    ExperimentServiceInterface experimentService =
        adWordsServices.get(session, ExperimentServiceInterface.class);

    // Create experiment with PROMOTED status.
    Experiment experiment = new Experiment();
    experiment.setId(experimentId);
    experiment.setStatus(ExperimentStatus.PROMOTED);

    // Create operation.
    ExperimentOperation operation = new ExperimentOperation();
    operation.setOperand(experiment);
    operation.setOperator(Operator.SET);

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

    // Promote experiment.
    ExperimentReturnValue result = experimentService.mutate(operations);

    // Display experiments.
    for (Experiment experimentResult : result.getValue()) {
      System.out.println("Experiment with name \"" + experimentResult.getName() + "\" and id \""
          + experimentResult.getId() + "\" was promoted.");
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201309.cm.ExperimentServiceInterface

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, Long campaignId, Long adGroupId,
      Long criterionId) throws Exception {
    // Get the ExperimentService.
    ExperimentServiceInterface experimentService =
        adWordsServices.get(session, ExperimentServiceInterface.class);

    // Get the AdGroupService.
    AdGroupServiceInterface adGroupService =
        adWordsServices.get(session, AdGroupServiceInterface.class);

    // Get the AdGroupCriterionService.
    AdGroupCriterionServiceInterface adGroupCriterionService =
        adWordsServices.get(session, AdGroupCriterionServiceInterface.class);

    // Create experiment.
    Experiment experiment = new Experiment();
    experiment.setCampaignId(campaignId);
    experiment.setName("Interplanetary Experiment #" + System.currentTimeMillis());
    experiment.setQueryPercentage(10);
    experiment.setStartDateTime(new DateTime().plusDays(1).toString("yyyyMMdd HHmmss Z"));

    // You can optionally provide these field(s).
    experiment.setEndDateTime(new DateTime().plusDays(30).toString("yyyyMMdd HHmmss Z"));

    // Create operation.
    ExperimentOperation experimentOperation = new ExperimentOperation();
    experimentOperation.setOperand(experiment);
    experimentOperation.setOperator(Operator.ADD);

    // Add experiment.
    ExperimentReturnValue result =
        experimentService.mutate(new ExperimentOperation[] {experimentOperation});

    for (Experiment experimentResult : result.getValue()) {
      System.out.println("Experiment with name \"" + experimentResult.getName() + "\" and id \""
          + experimentResult.getId() + "\" was added.");
    }
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.cm.ExperimentServiceInterface

  }

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, Long experimentId) throws Exception {
    // Get the ExperimentService.
    ExperimentServiceInterface experimentService =
        adWordsServices.get(session, ExperimentServiceInterface.class);

    // Create experiment with PROMOTED status.
    Experiment experiment = new Experiment();
    experiment.setId(experimentId);
    experiment.setStatus(ExperimentStatus.PROMOTED);

    // Create operation.
    ExperimentOperation operation = new ExperimentOperation();
    operation.setOperand(experiment);
    operation.setOperator(Operator.SET);

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

    // Promote experiment.
    ExperimentReturnValue result = experimentService.mutate(operations);

    // Display experiments.
    for (Experiment experimentResult : result.getValue()) {
      System.out.println("Experiment with name \"" + experimentResult.getName() + "\" and id \""
          + experimentResult.getId() + "\" was promoted.");
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.cm.ExperimentServiceInterface

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, Long campaignId, Long adGroupId,
      Long criterionId) throws Exception {
    // Get the ExperimentService.
    ExperimentServiceInterface experimentService =
        adWordsServices.get(session, ExperimentServiceInterface.class);

    // Get the AdGroupService.
    AdGroupServiceInterface adGroupService =
        adWordsServices.get(session, AdGroupServiceInterface.class);

    // Get the AdGroupCriterionService.
    AdGroupCriterionServiceInterface adGroupCriterionService =
        adWordsServices.get(session, AdGroupCriterionServiceInterface.class);

    // Create experiment.
    Experiment experiment = new Experiment();
    experiment.setCampaignId(campaignId);
    experiment.setName("Interplanetary Experiment #" + System.currentTimeMillis());
    experiment.setQueryPercentage(10);
    experiment.setStartDateTime(new DateTime().plusDays(1).toString("yyyyMMdd HHmmss Z"));

    // You can optionally provide these field(s).
    experiment.setEndDateTime(new DateTime().plusDays(30).toString("yyyyMMdd HHmmss Z"));

    // Create operation.
    ExperimentOperation experimentOperation = new ExperimentOperation();
    experimentOperation.setOperand(experiment);
    experimentOperation.setOperator(Operator.ADD);

    // Add experiment.
    ExperimentReturnValue result =
        experimentService.mutate(new ExperimentOperation[] {experimentOperation});

    for (Experiment experimentResult : result.getValue()) {
      System.out.println("Experiment with name \"" + experimentResult.getName() + "\" and id \""
          + experimentResult.getId() + "\" was added.");
    }
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201406.cm.ExperimentServiceInterface

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, Long campaignId, Long adGroupId,
      Long criterionId) throws Exception {
    // Get the ExperimentService.
    ExperimentServiceInterface experimentService =
        adWordsServices.get(session, ExperimentServiceInterface.class);

    // Get the AdGroupService.
    AdGroupServiceInterface adGroupService =
        adWordsServices.get(session, AdGroupServiceInterface.class);

    // Get the AdGroupCriterionService.
    AdGroupCriterionServiceInterface adGroupCriterionService =
        adWordsServices.get(session, AdGroupCriterionServiceInterface.class);

    // Create experiment.
    Experiment experiment = new Experiment();
    experiment.setCampaignId(campaignId);
    experiment.setName("Interplanetary Experiment #" + System.currentTimeMillis());
    experiment.setQueryPercentage(10);
    experiment.setStartDateTime(new DateTime().plusDays(1).toString("yyyyMMdd HHmmss Z"));

    // You can optionally provide these field(s).
    experiment.setEndDateTime(new DateTime().plusDays(30).toString("yyyyMMdd HHmmss Z"));

    // Create operation.
    ExperimentOperation experimentOperation = new ExperimentOperation();
    experimentOperation.setOperand(experiment);
    experimentOperation.setOperator(Operator.ADD);

    // Add experiment.
    ExperimentReturnValue result =
        experimentService.mutate(new ExperimentOperation[] {experimentOperation});

    for (Experiment experimentResult : result.getValue()) {
      System.out.println("Experiment with name \"" + experimentResult.getName() + "\" and id \""
          + experimentResult.getId() + "\" was added.");
    }
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201406.cm.ExperimentServiceInterface

  }

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, Long experimentId) throws Exception {
    // Get the ExperimentService.
    ExperimentServiceInterface experimentService =
        adWordsServices.get(session, ExperimentServiceInterface.class);

    // Create experiment with PROMOTED status.
    Experiment experiment = new Experiment();
    experiment.setId(experimentId);
    experiment.setStatus(ExperimentStatus.PROMOTED);

    // Create operation.
    ExperimentOperation operation = new ExperimentOperation();
    operation.setOperand(experiment);
    operation.setOperator(Operator.SET);

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

    // Promote experiment.
    ExperimentReturnValue result = experimentService.mutate(operations);

    // Display experiments.
    for (Experiment experimentResult : result.getValue()) {
      System.out.println("Experiment with name \"" + experimentResult.getName() + "\" and id \""
          + experimentResult.getId() + "\" was promoted.");
View Full Code Here

Examples of com.google.api.adwords.v201306.cm.ExperimentServiceInterface

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

      // Get the ExperimentService.
      ExperimentServiceInterface experimentService =
          user.getService(AdWordsService.V201306.EXPERIMENT_SERVICE);

      long experimentId = Long.parseLong("INSERT_EXPERIMENT_ID_HERE");

      // Create experiment with PROMOTED status.
      Experiment experiment = new Experiment();
      experiment.setId(experimentId);
      experiment.setStatus(ExperimentStatus.PROMOTED);

      // Create operation.
      ExperimentOperation operation = new ExperimentOperation();
      operation.setOperand(experiment);
      operation.setOperator(Operator.SET);

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

      // Promote experiment.
      ExperimentReturnValue result = experimentService.mutate(operations);

      // Display experiments.
      if (result.getValue() != null) {
        for(Experiment experimentResult : result.getValue()) {
          System.out.println("Experiment with name \"" + experimentResult.getName()
View Full Code Here

Examples of com.google.api.adwords.v201306.cm.ExperimentServiceInterface

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

      // Get the ExperimentService.
      ExperimentServiceInterface experimentService =
          user.getService(AdWordsService.V201306.EXPERIMENT_SERVICE);

      // Get the AdGroupService.
      AdGroupServiceInterface adGroupService =
          user.getService(AdWordsService.V201306.ADGROUP_SERVICE);

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

      // Replace with valid values of your account.
      long campaignId = Long.parseLong("INSERT_CAMPAIGN_ID_HERE");
      long adGroupId = Long.parseLong("INSERT_AD_GROUP_ID_HERE");
      long criterionId = Long.parseLong("INSERT_CRITERION_ID_HERE");

      // Create experiment.
      Experiment experiment = new Experiment();
      experiment.setCampaignId(campaignId);
      experiment.setName("Interplanetary Experiment #" + System.currentTimeMillis());
      experiment.setQueryPercentage(10);
      experiment.setStartDateTime(new SimpleDateFormat("yyyyMMdd HHmmss Z").format(new Date()));

      // Create operation.
      ExperimentOperation experimentOperation = new ExperimentOperation();
      experimentOperation.setOperand(experiment);
      experimentOperation.setOperator(Operator.ADD);

      // Add experiment.
      ExperimentReturnValue result =
          experimentService.mutate(new ExperimentOperation[]{experimentOperation});

      if (result.getValue() != null) {
        for(Experiment experimentResult : result.getValue()) {
          System.out.println("Experiment with name \"" + experimentResult.getName()
              + "\" and id \"" + experimentResult.getId() + "\" was added.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.