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

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


    // Get the ConversionTrackerService.
    ConversionTrackerServiceInterface service =
        adWordsServices.get(session, ConversionTrackerServiceInterface.class);

    // Create AdWords conversion.
    AdWordsConversionTracker adWordsConversionTracker = new AdWordsConversionTracker();
    adWordsConversionTracker.setName("Earth to Mars Cruises Conversion # "
        + System.currentTimeMillis());
    adWordsConversionTracker.setCategory(ConversionTrackerCategory.DEFAULT);
    adWordsConversionTracker.setMarkupLanguage(AdWordsConversionTrackerMarkupLanguage.HTML);
    adWordsConversionTracker.setTextFormat(AdWordsConversionTrackerTextFormat.HIDDEN);

    // You can optionally provide these field(s).
    adWordsConversionTracker.setStatus(ConversionTrackerStatus.ENABLED);
    adWordsConversionTracker.setViewthroughLookbackWindow(15);
    adWordsConversionTracker.setIsProductAdsChargeable(Boolean.TRUE);
    adWordsConversionTracker.setProductAdsChargeableConversionWindow(15);
    adWordsConversionTracker.setConversionPageLanguage("en");
    adWordsConversionTracker.setBackgroundColor("#0000FF");
    adWordsConversionTracker.setUserRevenueValue("someJavascriptVariable");

    // Create operations.
    ConversionTrackerOperation operation = new ConversionTrackerOperation();
    operation.setOperator(Operator.ADD);
    operation.setOperand(adWordsConversionTracker);

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

    // Add conversion.
    ConversionTrackerReturnValue result = service.mutate(operations);

    // Display conversion.
    for (ConversionTracker conversionTracker : result.getValue()) {
      if (conversionTracker instanceof AdWordsConversionTracker) {
        AdWordsConversionTracker newAdWordsConversionTracker =
            (AdWordsConversionTracker) conversionTracker;
        System.out.printf("Conversion with id \"%d\", name \"%s\", status \"%s\", "
            + "category \"%s\" and snippet \"%s\" was added.\n",
            newAdWordsConversionTracker.getId(), newAdWordsConversionTracker.getName(),
            newAdWordsConversionTracker.getStatus(), newAdWordsConversionTracker.getCategory(),
            newAdWordsConversionTracker.getSnippet());
      } else {
        System.out.printf("Conversion with id \"%d\", name \"%s\", status \"%s\", "
            + "category \"%s\" was added.\n", conversionTracker.getId(),
            conversionTracker.getName(), conversionTracker.getStatus(),
            conversionTracker.getCategory());
View Full Code Here


    // Get the ConversionTrackerService.
    ConversionTrackerServiceInterface service =
        adWordsServices.get(session, ConversionTrackerServiceInterface.class);

    // Create AdWords conversion.
    AdWordsConversionTracker adWordsConversionTracker = new AdWordsConversionTracker();
    adWordsConversionTracker.setName("Earth to Mars Cruises Conversion # "
        + System.currentTimeMillis());
    adWordsConversionTracker.setCategory(ConversionTrackerCategory.DEFAULT);
    adWordsConversionTracker.setMarkupLanguage(AdWordsConversionTrackerMarkupLanguage.HTML);
    adWordsConversionTracker.setTextFormat(AdWordsConversionTrackerTextFormat.HIDDEN);

    // You can optionally provide these field(s).
    adWordsConversionTracker.setStatus(ConversionTrackerStatus.ENABLED);
    adWordsConversionTracker.setViewthroughLookbackWindow(15);
    adWordsConversionTracker.setIsProductAdsChargeable(Boolean.TRUE);
    adWordsConversionTracker.setProductAdsChargeableConversionWindow(15);
    adWordsConversionTracker.setConversionPageLanguage("en");
    adWordsConversionTracker.setBackgroundColor("#0000FF");
    adWordsConversionTracker.setUserRevenueValue("someJavascriptVariable");

    // Create operations.
    ConversionTrackerOperation operation = new ConversionTrackerOperation();
    operation.setOperator(Operator.ADD);
    operation.setOperand(adWordsConversionTracker);

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

    // Add conversion.
    ConversionTrackerReturnValue result = service.mutate(operations);

    // Display conversion.
    for (ConversionTracker conversionTracker : result.getValue()) {
      if (conversionTracker instanceof AdWordsConversionTracker) {
        AdWordsConversionTracker newAdWordsConversionTracker =
            (AdWordsConversionTracker) conversionTracker;
        System.out.printf("Conversion with id \"%d\", name \"%s\", status \"%s\", "
            + "category \"%s\" and snippet \"%s\" was added.\n",
            newAdWordsConversionTracker.getId(), newAdWordsConversionTracker.getName(),
            newAdWordsConversionTracker.getStatus(), newAdWordsConversionTracker.getCategory(),
            newAdWordsConversionTracker.getSnippet());
      } else {
        System.out.printf("Conversion with id \"%d\", name \"%s\", status \"%s\", "
            + "category \"%s\" was added.\n", conversionTracker.getId(),
            conversionTracker.getName(), conversionTracker.getStatus(),
            conversionTracker.getCategory());
View Full Code Here

    // Get the ConversionTrackerService.
    ConversionTrackerServiceInterface service =
        adWordsServices.get(session, ConversionTrackerServiceInterface.class);

    // Create AdWords conversion.
    AdWordsConversionTracker adWordsConversionTracker = new AdWordsConversionTracker();
    adWordsConversionTracker.setName("Earth to Mars Cruises Conversion # "
        + System.currentTimeMillis());
    adWordsConversionTracker.setCategory(ConversionTrackerCategory.DEFAULT);
    adWordsConversionTracker.setMarkupLanguage(AdWordsConversionTrackerMarkupLanguage.HTML);
    adWordsConversionTracker.setTextFormat(AdWordsConversionTrackerTextFormat.HIDDEN);

    // You can optionally provide these field(s).
    adWordsConversionTracker.setStatus(ConversionTrackerStatus.ENABLED);
    adWordsConversionTracker.setViewthroughLookbackWindow(15);
    adWordsConversionTracker.setIsProductAdsChargeable(Boolean.TRUE);
    adWordsConversionTracker.setProductAdsChargeableConversionWindow(15);
    adWordsConversionTracker.setConversionPageLanguage("en");
    adWordsConversionTracker.setBackgroundColor("#0000FF");
    adWordsConversionTracker.setDefaultRevenueValue(1d);
    adWordsConversionTracker.setAlwaysUseDefaultRevenueValue(Boolean.TRUE);

    // Create operations.
    ConversionTrackerOperation operation = new ConversionTrackerOperation();
    operation.setOperator(Operator.ADD);
    operation.setOperand(adWordsConversionTracker);

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

    // Add conversion.
    ConversionTrackerReturnValue result = service.mutate(operations);

    // Display conversion.
    for (ConversionTracker conversionTracker : result.getValue()) {
      if (conversionTracker instanceof AdWordsConversionTracker) {
        AdWordsConversionTracker newAdWordsConversionTracker =
            (AdWordsConversionTracker) conversionTracker;
        System.out.printf("Conversion with id \"%d\", name \"%s\", status \"%s\", "
            + "category \"%s\" and snippet \"%s\" was added.\n",
            newAdWordsConversionTracker.getId(), newAdWordsConversionTracker.getName(),
            newAdWordsConversionTracker.getStatus(), newAdWordsConversionTracker.getCategory(),
            newAdWordsConversionTracker.getSnippet());
      } else {
        System.out.printf("Conversion with id \"%d\", name \"%s\", status \"%s\", "
            + "category \"%s\" was added.\n", conversionTracker.getId(),
            conversionTracker.getName(), conversionTracker.getStatus(),
            conversionTracker.getCategory());
View Full Code Here

    // Get the ConversionTrackerService.
    ConversionTrackerServiceInterface service =
        adWordsServices.get(session, ConversionTrackerServiceInterface.class);

    // Create AdWords conversion.
    AdWordsConversionTracker adWordsConversionTracker = new AdWordsConversionTracker();
    adWordsConversionTracker.setName("Earth to Mars Cruises Conversion # "
        + System.currentTimeMillis());
    adWordsConversionTracker.setCategory(ConversionTrackerCategory.DEFAULT);
    adWordsConversionTracker.setMarkupLanguage(AdWordsConversionTrackerMarkupLanguage.HTML);
    adWordsConversionTracker.setTextFormat(AdWordsConversionTrackerTextFormat.HIDDEN);

    // You can optionally provide these field(s).
    adWordsConversionTracker.setStatus(ConversionTrackerStatus.ENABLED);
    adWordsConversionTracker.setViewthroughLookbackWindow(15);
    adWordsConversionTracker.setIsProductAdsChargeable(Boolean.TRUE);
    adWordsConversionTracker.setProductAdsChargeableConversionWindow(15);
    adWordsConversionTracker.setConversionPageLanguage("en");
    adWordsConversionTracker.setBackgroundColor("#0000FF");
    adWordsConversionTracker.setDefaultRevenueValue(1d);
    adWordsConversionTracker.setAlwaysUseDefaultRevenueValue(Boolean.TRUE);

    // Create operations.
    ConversionTrackerOperation operation = new ConversionTrackerOperation();
    operation.setOperator(Operator.ADD);
    operation.setOperand(adWordsConversionTracker);

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

    // Add conversion.
    ConversionTrackerReturnValue result = service.mutate(operations);

    // Display conversion.
    for (ConversionTracker conversionTracker : result.getValue()) {
      if (conversionTracker instanceof AdWordsConversionTracker) {
        AdWordsConversionTracker newAdWordsConversionTracker =
            (AdWordsConversionTracker) conversionTracker;
        System.out.printf("Conversion with id \"%d\", name \"%s\", status \"%s\", "
            + "category \"%s\" and snippet \"%s\" was added.\n",
            newAdWordsConversionTracker.getId(), newAdWordsConversionTracker.getName(),
            newAdWordsConversionTracker.getStatus(), newAdWordsConversionTracker.getCategory(),
            newAdWordsConversionTracker.getSnippet());
      } else {
        System.out.printf("Conversion with id \"%d\", name \"%s\", status \"%s\", "
            + "category \"%s\" was added.\n", conversionTracker.getId(),
            conversionTracker.getName(), conversionTracker.getStatus(),
            conversionTracker.getCategory());
View Full Code Here

    selectorCopy.getFields().addAll(Sets.newLinkedHashSet(this.fields));
    selectorCopy.getOrdering().addAll(orderingCopy);
    selectorCopy.getPredicates().addAll(predicatesCopy);

    if (this.dateRange != null) {
      DateRange newDateRange = new DateRange();
      newDateRange.setMin(this.dateRange.getMin());
      newDateRange.setMax(this.dateRange.getMax());
      selectorCopy.setDateRange(newDateRange);
    }
    if (this.paging != null) {
      Paging newPaging = new Paging();
      newPaging.setStartIndex(this.paging.getStartIndex());
View Full Code Here

   *
   * @return the builder itself to proceed the chain.
   */
  public SelectorBuilder forDateRange(DateTime start, DateTime end) {
    if (this.dateRange == null) {
      this.dateRange = new DateRange();
    }
    DateFormat dateFormat = new SimpleDateFormat(DEFAULT_DATE_FORMAT);
    if (start != null) {
      this.dateRange.setMin(dateFormat.format(start.toDate()));
    }
View Full Code Here

    Assert.assertEquals(selector.getDateRange().getMin(), formatStart);
    Assert.assertEquals(selector.getDateRange().getMax(), formatEnd);

    String formatEndPlusOne = dateFormat.format(end.plusDays(1).toDate());

    DateRange dateRange = new DateRange();
    dateRange.setMin(formatStart);
    dateRange.setMax(formatEndPlusOne);

    selector.setDateRange(dateRange);

    Assert.assertEquals(selector.getDateRange().getMin(), formatStart);
    Assert.assertEquals(selector.getDateRange().getMax(), formatEndPlusOne);
View Full Code Here

   * @return the new set of OrderBy objects with different instance for each of the OrderBy
   */
  private Set<OrderBy> copyOrderingSet() {
    Set<OrderBy> orderingCopy = Sets.newLinkedHashSet();
    for (OrderBy order : this.ordering) {
      OrderBy copyOrder = new OrderBy();
      copyOrder.setField(order.getField());
      copyOrder.setSortOrder(order.getSortOrder());
      orderingCopy.add(copyOrder);
    }
    return orderingCopy;
  }
View Full Code Here

   * Adds the order by the given field, on ASCENDING sort.
   *
   * @return the builder itself to proceed the chain.
   */
  public SelectorBuilder orderAscBy(String field) {
    OrderBy order = new OrderBy();
    order.setField(field);
    order.setSortOrder(SortOrder.ASCENDING);

    this.ordering.add(order);

    return this;
  }
View Full Code Here

   * Adds the order by the given field, on DESCENDING sort.
   *
   * @return the builder itself to proceed the chain.
   */
  public SelectorBuilder orderDescBy(String field) {
    OrderBy order = new OrderBy();
    order.setField(field);
    order.setSortOrder(SortOrder.DESCENDING);

    this.ordering.add(order);

    return this;
  }
View Full Code Here

TOP

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

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.