Package com.google.api.ads.adwords.axis.v201406.video

Examples of com.google.api.ads.adwords.axis.v201406.video.Topic


    // Create the call to action.
    VideoCallToAction videoCallToAction = new VideoCallToAction();
    videoCallToAction.setId(videoId);
   
    CallToAction callToAction = new CallToAction();
    CallToActionCreative callToActionCreative = new CallToActionCreative();
    callToActionCreative.setHeadline("Mars cruise");
    callToActionCreative.setDisplayUrl("www.example.com/mars");
    callToActionCreative.setDestinationUrl("www.example.com/mars");
    callToAction.setCreative(callToActionCreative);
    videoCallToAction.setCallToAction(callToAction);

    VideoCallToActionOperation operation = new VideoCallToActionOperation();
    operation.setOperand(videoCallToAction);
View Full Code Here


    VideoCampaignCriterion criterion = new VideoCampaignCriterion();
    criterion.setCampaignId(campaignId);
   
    // This creates an English language criterion
    // For a list of languages, see ConstantDataService
    LanguageVideoCriterion englishCriterion = new LanguageVideoCriterion();
    englishCriterion.setId(1001L);
    criterion.setCriterion(englishCriterion);
   
    VideoCampaignCriterionOperation operation =
        new VideoCampaignCriterionOperation();
    operation.setOperand(criterion);
View Full Code Here

        new TargetingGroupCriterionOperation();
    addAgeCriterionOp.setOperand(ageCriterion);
    addAgeCriterionOp.setOperator(Operator.ADD);
   
    // Create a negative age criterion for age 65+.
    NegativeTargetingGroupCriterion negativeAgeCriterion =
        new NegativeTargetingGroupCriterion();
    negativeAgeCriterion.setCampaignId(campaignId);
    negativeAgeCriterion.setTargetingGroupId(targetingGroupId);
    AudienceAge negativeAge = new AudienceAge();
    negativeAge.setAgeRange(AudienceAgeAgeRange.AGE_RANGE_65_UP);
    negativeAgeCriterion.setCriterion(negativeAge);

    TargetingGroupCriterionOperation addNegativeAgeCriterionOp =
        new TargetingGroupCriterionOperation();
    addNegativeAgeCriterionOp.setOperand(negativeAgeCriterion);
    addNegativeAgeCriterionOp.setOperator(Operator.ADD);
View Full Code Here

    String minDateTime = new DateTime().toString("yyyy0101");
    // Set max date time to the current date.
    String maxDateTime = new DateTime().toString("yyyyMMdd");

    // Create selector.
    StatsSelector statsSelector = new StatsSelector();
    statsSelector.setDateRange(new DateRange(minDateTime, maxDateTime));
    statsSelector.setSegmentationDimensions(
        new SegmentationDimension[] {SegmentationDimension.DATE_MONTH});
    statsSelector.setMetrics(
        new Metric[] {Metric.VIEWS, Metric.COST, Metric.AVERAGE_CPV});
    statsSelector.setSummaryTypes(
        new VideoEntityStatsSummaryType[] {VideoEntityStatsSummaryType.ALL});
    statsSelector.setSegmentedSummaryType(VideoEntityStatsSummaryType.ALL);

    int offset = 0;

    VideoCampaignSelector selector = new VideoCampaignSelector();
    selector.setStatsSelector(statsSelector);
View Full Code Here

      Long campaignId, Long targetingGroupId) throws Exception {
    // Get the VideoTargetingGroupService.
    VideoTargetingGroupServiceInterface videoTargetingGroupService =
        adWordsServices.get(session, VideoTargetingGroupServiceInterface.class);

    TargetingGroup targetingGroup = new TargetingGroup();
    targetingGroup.setId(targetingGroupId);
    targetingGroup.setCampaignId(campaignId);
   
    Money amount = new Money();
    amount.setMicroAmount(200000L);
   
    VideoBid videoBid = new VideoBid();
    videoBid.setAmount(amount);
   
    VideoAdDisplayFormat_VideoBidMapEntry trueViewBid =
        new VideoAdDisplayFormat_VideoBidMapEntry();
   
    trueViewBid.setKey(VideoAdDisplayFormat.TRUE_VIEW_IN_DISPLAY);
    trueViewBid.setValue(videoBid);
    targetingGroup.setBidsByFormat(
        new BidsByFormat(new VideoAdDisplayFormat_VideoBidMapEntry[] {trueViewBid}));
   
    TargetingGroupOperation operation = new TargetingGroupOperation();
    operation.setOperator(Operator.SET);
    operation.setOperand(targetingGroup);
View Full Code Here

    // Get the VideoTargetingGroupCriterionService
    VideoTargetingGroupCriterionServiceInterface videoTargetingGroupCriterionService =
        adWordsServices.get(session, VideoTargetingGroupCriterionServiceInterface.class);

    // Create an age criterion for age range 18 to 24.
    TargetingGroupCriterion ageCriterion = new TargetingGroupCriterion();
    ageCriterion.setCampaignId(campaignId);
    ageCriterion.setTargetingGroupId(targetingGroupId);
    AudienceAge age = new AudienceAge();
    age.setAgeRange(AudienceAgeAgeRange.AGE_RANGE_18_24);
    ageCriterion.setCriterion(age);

    TargetingGroupCriterionOperation addAgeCriterionOp =
        new TargetingGroupCriterionOperation();
    addAgeCriterionOp.setOperand(ageCriterion);
    addAgeCriterionOp.setOperator(Operator.ADD);
   
    // Create a negative age criterion for age 65+.
    NegativeTargetingGroupCriterion negativeAgeCriterion =
        new NegativeTargetingGroupCriterion();
    negativeAgeCriterion.setCampaignId(campaignId);
    negativeAgeCriterion.setTargetingGroupId(targetingGroupId);
    AudienceAge negativeAge = new AudienceAge();
    negativeAge.setAgeRange(AudienceAgeAgeRange.AGE_RANGE_65_UP);
    negativeAgeCriterion.setCriterion(negativeAge);

    TargetingGroupCriterionOperation addNegativeAgeCriterionOp =
        new TargetingGroupCriterionOperation();
    addNegativeAgeCriterionOp.setOperand(negativeAgeCriterion);
    addNegativeAgeCriterionOp.setOperator(Operator.ADD);

    // Create a gender criterion for male.
    TargetingGroupCriterion genderCriterion = new TargetingGroupCriterion();
    AudienceGender gender = new AudienceGender();
    gender.setGenderType(AudienceGenderGenderType.GENDER_MALE);
    genderCriterion.setCampaignId(campaignId);
    genderCriterion.setTargetingGroupId(targetingGroupId);
    genderCriterion.setCriterion(gender);

    TargetingGroupCriterionOperation addGenderCriterionOp =
        new TargetingGroupCriterionOperation();
    addGenderCriterionOp.setOperand(genderCriterion);
    addGenderCriterionOp.setOperator(Operator.ADD);

    // Create a topic criterion for the Autos & Vehicles topic.
    // See ConstantDataService for a list of verticals.
    TargetingGroupCriterion topicCriterion = new TargetingGroupCriterion();
    Topic topic = new Topic();
    topic.setVerticalId(47L);
    topicCriterion.setCampaignId(campaignId);
    topicCriterion.setTargetingGroupId(targetingGroupId);
    topicCriterion.setCriterion(topic);

    TargetingGroupCriterionOperation addTopicCriterionOp =
        new TargetingGroupCriterionOperation();
    addTopicCriterionOp.setOperand(topicCriterion);
    addTopicCriterionOp.setOperator(Operator.ADD);

    // Create an interest criterion for the Tablet PC interest.
    // See ConstantDataService for a list of verticals.
    TargetingGroupCriterion interestCriterion = new TargetingGroupCriterion();
    AudienceInterest interest = new AudienceInterest();
    interest.setInterestId(1277L);

    interestCriterion.setCampaignId(campaignId);
    interestCriterion.setTargetingGroupId(targetingGroupId);
    interestCriterion.setCriterion(interest);

    TargetingGroupCriterionOperation addUserInterestCriteriaOp =
        new TargetingGroupCriterionOperation();
    addUserInterestCriteriaOp.setOperand(interestCriterion);
    addUserInterestCriteriaOp.setOperator(Operator.ADD);
View Full Code Here

    ageCriterion.setTargetingGroupId(targetingGroupId);
    AudienceAge age = new AudienceAge();
    age.setAgeRange(AudienceAgeAgeRange.AGE_RANGE_18_24);
    ageCriterion.setCriterion(age);

    TargetingGroupCriterionOperation addAgeCriterionOp =
        new TargetingGroupCriterionOperation();
    addAgeCriterionOp.setOperand(ageCriterion);
    addAgeCriterionOp.setOperator(Operator.ADD);
   
    // Create a negative age criterion for age 65+.
    NegativeTargetingGroupCriterion negativeAgeCriterion =
        new NegativeTargetingGroupCriterion();
    negativeAgeCriterion.setCampaignId(campaignId);
    negativeAgeCriterion.setTargetingGroupId(targetingGroupId);
    AudienceAge negativeAge = new AudienceAge();
    negativeAge.setAgeRange(AudienceAgeAgeRange.AGE_RANGE_65_UP);
    negativeAgeCriterion.setCriterion(negativeAge);

    TargetingGroupCriterionOperation addNegativeAgeCriterionOp =
        new TargetingGroupCriterionOperation();
    addNegativeAgeCriterionOp.setOperand(negativeAgeCriterion);
    addNegativeAgeCriterionOp.setOperator(Operator.ADD);

    // Create a gender criterion for male.
    TargetingGroupCriterion genderCriterion = new TargetingGroupCriterion();
    AudienceGender gender = new AudienceGender();
    gender.setGenderType(AudienceGenderGenderType.GENDER_MALE);
    genderCriterion.setCampaignId(campaignId);
    genderCriterion.setTargetingGroupId(targetingGroupId);
    genderCriterion.setCriterion(gender);

    TargetingGroupCriterionOperation addGenderCriterionOp =
        new TargetingGroupCriterionOperation();
    addGenderCriterionOp.setOperand(genderCriterion);
    addGenderCriterionOp.setOperator(Operator.ADD);

    // Create a topic criterion for the Autos & Vehicles topic.
    // See ConstantDataService for a list of verticals.
    TargetingGroupCriterion topicCriterion = new TargetingGroupCriterion();
    Topic topic = new Topic();
    topic.setVerticalId(47L);
    topicCriterion.setCampaignId(campaignId);
    topicCriterion.setTargetingGroupId(targetingGroupId);
    topicCriterion.setCriterion(topic);

    TargetingGroupCriterionOperation addTopicCriterionOp =
        new TargetingGroupCriterionOperation();
    addTopicCriterionOp.setOperand(topicCriterion);
    addTopicCriterionOp.setOperator(Operator.ADD);

    // Create an interest criterion for the Tablet PC interest.
    // See ConstantDataService for a list of verticals.
    TargetingGroupCriterion interestCriterion = new TargetingGroupCriterion();
    AudienceInterest interest = new AudienceInterest();
    interest.setInterestId(1277L);

    interestCriterion.setCampaignId(campaignId);
    interestCriterion.setTargetingGroupId(targetingGroupId);
    interestCriterion.setCriterion(interest);

    TargetingGroupCriterionOperation addUserInterestCriteriaOp =
        new TargetingGroupCriterionOperation();
    addUserInterestCriteriaOp.setOperand(interestCriterion);
    addUserInterestCriteriaOp.setOperator(Operator.ADD);

    TargetingGroupCriterionReturnValue result = videoTargetingGroupCriterionService.mutate(
        new TargetingGroupCriterionOperation[] {
          addAgeCriterionOp, addGenderCriterionOp,
          addNegativeAgeCriterionOp, addTopicCriterionOp,
View Full Code Here

    TargetingGroupCriterionSelector selector = new TargetingGroupCriterionSelector();
    selector.setTargetingGroupIds(new long[] {targetingGroupId});
    selector.setCriteriaDimension(CriteriaDimension.KEYWORD);
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    TargetingGroupCriterionPage page;
    do {
      // Get all criteria for the campaign.
      page = videoTargetingGroupCriterionService.get(selector);

      // Display criteria.
      if (page.getEntries() != null) {
        for (TargetingGroupCriterion targetingGroupCampaignCriterion : page.getEntries()) {
          String negative =
              (targetingGroupCampaignCriterion instanceof NegativeTargetingGroupCriterion)
                  ? " (negative)"
                  : "";
          System.out.printf("Video%s criterion id %d of type '%s' was found.%n",
              negative,
              targetingGroupCampaignCriterion.getCriterion().getId(),
              targetingGroupCampaignCriterion.getCriterion().getBaseCriterionType());
        }
      } else {
        System.out.println("No criteria were found.");
      }

      offset += PAGE_SIZE;
      selector.getPaging().setStartIndex(offset);
    } while (offset < page.getTotalNumEntries());
  }
View Full Code Here

    TargetingGroupCriterionOperation addUserInterestCriteriaOp =
        new TargetingGroupCriterionOperation();
    addUserInterestCriteriaOp.setOperand(interestCriterion);
    addUserInterestCriteriaOp.setOperator(Operator.ADD);

    TargetingGroupCriterionReturnValue result = videoTargetingGroupCriterionService.mutate(
        new TargetingGroupCriterionOperation[] {
          addAgeCriterionOp, addGenderCriterionOp,
          addNegativeAgeCriterionOp, addTopicCriterionOp,
          addUserInterestCriteriaOp});
   
    for (TargetingGroupCriterion targetingGroupCriterionResult : result.getValue()) {
      System.out.printf("Targeting group criterion with campaign id %d, "
          + "targeting group id %d, criterion id %d, "
          + "and type '%s' was added.%n",
          targetingGroupCriterionResult.getCampaignId(),
          targetingGroupCriterionResult.getTargetingGroupId(),
View Full Code Here

        adWordsServices.get(session, VideoTargetingGroupCriterionServiceInterface.class);

    int offset = 0;

    // Create selector.
    TargetingGroupCriterionSelector selector = new TargetingGroupCriterionSelector();
    selector.setTargetingGroupIds(new long[] {targetingGroupId});
    selector.setCriteriaDimension(CriteriaDimension.KEYWORD);
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    TargetingGroupCriterionPage page;
    do {
      // Get all criteria for the campaign.
      page = videoTargetingGroupCriterionService.get(selector);

      // Display criteria.
      if (page.getEntries() != null) {
        for (TargetingGroupCriterion targetingGroupCampaignCriterion : page.getEntries()) {
          String negative =
              (targetingGroupCampaignCriterion instanceof NegativeTargetingGroupCriterion)
                  ? " (negative)"
                  : "";
          System.out.printf("Video%s criterion id %d of type '%s' was found.%n",
              negative,
              targetingGroupCampaignCriterion.getCriterion().getId(),
              targetingGroupCampaignCriterion.getCriterion().getBaseCriterionType());
        }
      } else {
        System.out.println("No criteria were found.");
      }

      offset += PAGE_SIZE;
      selector.getPaging().setStartIndex(offset);
    } while (offset < page.getTotalNumEntries());
  }
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.axis.v201406.video.Topic

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.