Package com.google.api.ads.adwords.axis.v201402.cm

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


    CampaignCriterionServiceInterface campaignCriterionService =
        adWordsServices.get(session, CampaignCriterionServiceInterface.class);

    // Create locations. The IDs can be found in the documentation or
    // retrieved with the LocationCriterionService.
    Location california = new Location();
    california.setId(21137L);
    Location mexico = new Location();
    mexico.setId(2484L);

    // Create languages. The IDs can be found in the documentation or
    // retrieved with the ConstantDataService.
    Language english = new Language();
    english.setId(1000L);
View Full Code Here


  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, String[] locationNames)
      throws Exception {
    // Get the LocationCriterionService.
    LocationCriterionServiceInterface locationCriterionService =
        adWordsServices.get(session, LocationCriterionServiceInterface.class);

    Selector selector = new SelectorBuilder()
        .fields(
            "Id",
            "LocationName",
            "CanonicalName",
            "DisplayType",
            "ParentLocations",
            "Reach",
            "TargetingStatus")
        // Location names must match exactly, only EQUALS and IN are supported.
        .in("LocationName", locationNames)
        // Set the locale of the returned location names.
        .equals("Locale", "en")
        .build();

    // Make the get request.
    LocationCriterion[] locationCriteria = locationCriterionService.get(selector);

    // Display the resulting location criteria.
    for (LocationCriterion locationCriterion : locationCriteria) {
      String parentString =
          getParentLocationString(locationCriterion.getLocation().getParentLocations());
View Full Code Here

    spanish.setId(1003L);
   
    // Location groups criteria. These represent targeting by household income
    // or places of interest. The IDs can be found in the documentation or
    // retrieved with the LocationCriterionService.
    LocationGroups locationGroupTier3 = new LocationGroups();
    Function tier3MatchingFunction = new Function();
    tier3MatchingFunction.setLhsOperand(new FunctionArgumentOperand[] {
        // Tiers are numbered 1-10, and represent 10% segments of earners.
        // For example, TIER_1 is the top 10%, TIER_2 is the 80-90%, etc.
        // Tiers 6 through 10 are grouped into TIER_6_TO_10.
        new IncomeOperand(null, IncomeTier.TIER_3)
    });
    tier3MatchingFunction.setOperator(FunctionOperator.AND);
    tier3MatchingFunction.setRhsOperand(new FunctionArgumentOperand[] {
        new GeoTargetOperand(null, new long[]{ 1015116L }) // Miami, FL
    });
    locationGroupTier3.setMatchingFunction(tier3MatchingFunction);

    LocationGroups locationGroupDowntown = new LocationGroups();
    Function downtownMatchingFunction = new Function();
    downtownMatchingFunction.setLhsOperand(new FunctionArgumentOperand[] {
        new PlacesOfInterestOperand(null, PlacesOfInterestOperandCategory.DOWNTOWN)
    });
    downtownMatchingFunction.setOperator(FunctionOperator.AND);
    downtownMatchingFunction.setRhsOperand(new FunctionArgumentOperand[] {
        new GeoTargetOperand(null, new long[]{ 1015116L }) // Miami, FL
    });
    locationGroupDowntown.setMatchingFunction(downtownMatchingFunction);

    List<CampaignCriterionOperation> operations = new ArrayList<CampaignCriterionOperation>();
    for (Criterion criterion : new Criterion[] {california, mexico, english, spanish,
        locationGroupTier3, locationGroupDowntown}) {
      CampaignCriterionOperation operation = new CampaignCriterionOperation();
View Full Code Here

    campaign.setStatus(CampaignStatus.PAUSED);
    BiddingStrategyConfiguration biddingStrategyConfiguration = new BiddingStrategyConfiguration();
    biddingStrategyConfiguration.setBiddingStrategyType(BiddingStrategyType.MANUAL_CPC);

    // You can optionally provide a bidding scheme in place of the type.
    ManualCpcBiddingScheme cpcBiddingScheme = new ManualCpcBiddingScheme();
    cpcBiddingScheme.setEnhancedCpcEnabled(false);
    biddingStrategyConfiguration.setBiddingScheme(cpcBiddingScheme);

    campaign.setBiddingStrategyConfiguration(biddingStrategyConfiguration);

    // You can optionally provide these field(s).
View Full Code Here

        adWordsServices.get(session, BudgetServiceInterface.class);

    // Create a budget, which can be shared by multiple campaigns.
    Budget sharedBudget = new Budget();
    sharedBudget.setName("Interplanetary Cruise #" + System.currentTimeMillis());
    Money budgetAmount = new Money();
    budgetAmount.setMicroAmount(50000000L);
    sharedBudget.setAmount(budgetAmount);
    sharedBudget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
    sharedBudget.setPeriod(BudgetBudgetPeriod.DAILY);

    BudgetOperation budgetOperation = new BudgetOperation();
View Full Code Here

    targeting.setDetails(new TargetingSettingDetail[]{placements, verticals});

    // Create ad group bid.
    BiddingStrategyConfiguration biddingStrategyConfiguration = new BiddingStrategyConfiguration();
    CpcBid bid = new CpcBid();
    bid.setBid(new Money(null, 10000000L));
    biddingStrategyConfiguration.setBids(new Bids[] {bid});
    adGroup.setBiddingStrategyConfiguration(biddingStrategyConfiguration);

    // Add as many additional ad groups as you need.
    AdGroup adGroup2 = new AdGroup();
    adGroup2.setName("Earth to Venus Cruises #" + System.currentTimeMillis());
    adGroup2.setStatus(AdGroupStatus.ENABLED);
    adGroup2.setCampaignId(campaignId);

    BiddingStrategyConfiguration biddingStrategyConfiguration2 = new BiddingStrategyConfiguration();
    CpcBid bid2 = new CpcBid();
    bid2.setBid(new Money(null, 10000000L));
    biddingStrategyConfiguration2.setBids(new Bids[] {bid2});
    adGroup2.setBiddingStrategyConfiguration(biddingStrategyConfiguration2);

    // Create operations.
    AdGroupOperation operation = new AdGroupOperation();
View Full Code Here

      AdGroupCriterion criterion;
      if (bidAmount != null && bidAmount > 0) {
        BiddingStrategyConfiguration biddingStrategyConfiguration =
            new BiddingStrategyConfiguration();
       
        Money bidAmountMoney = new Money();
        bidAmountMoney.setMicroAmount(bidAmount);
        CpcBid cpcBid = new CpcBid();
        cpcBid.setBid(bidAmountMoney);
        biddingStrategyConfiguration.setBids(new Bids[] {cpcBid});
        BiddableAdGroupCriterion biddableCriterion = new BiddableAdGroupCriterion();
        biddableCriterion.setBiddingStrategyConfiguration(biddingStrategyConfiguration);
View Full Code Here

    genderBiddableAdGroupCriterion.setCriterion(male);

    // https://developers.google.com/adwords/api/docs/appendix/ages
    AgeRange undetermined = new AgeRange();
    undetermined.setId(503999L);
    NegativeAdGroupCriterion ageRangeNegativeAdGroupCriterion = new NegativeAdGroupCriterion();
    ageRangeNegativeAdGroupCriterion.setAdGroupId(adGroupId);
    ageRangeNegativeAdGroupCriterion.setCriterion(undetermined);

    AdGroupCriterionOperation genderAdGroupCriterionOperation = new AdGroupCriterionOperation();
    genderAdGroupCriterionOperation.setOperand(genderBiddableAdGroupCriterion);
    genderAdGroupCriterionOperation.setOperator(Operator.ADD);
    AdGroupCriterionOperation ageRangeNegativeAdGroupCriterionOperation =
View Full Code Here

        biddingStrategyConfiguration.setBids(new Bids[] {cpcBid});
        BiddableAdGroupCriterion biddableCriterion = new BiddableAdGroupCriterion();
        biddableCriterion.setBiddingStrategyConfiguration(biddingStrategyConfiguration);
        criterion = biddableCriterion;
      } else {
        criterion = new NegativeAdGroupCriterion();
      }
     
      criterion.setAdGroupId(adGroupId);
      criterion.setCriterion(unit);
     
View Full Code Here

    campaign.setBudget(budget);

    campaign.setAdvertisingChannelType(AdvertisingChannelType.SEARCH);
   
    // Set the campaign network options to Search and Search Network.
    NetworkSetting networkSetting = new NetworkSetting();
    networkSetting.setTargetGoogleSearch(true);
    networkSetting.setTargetSearchNetwork(true);
    networkSetting.setTargetContentNetwork(false);
    networkSetting.setTargetPartnerSearchNetwork(false);
    campaign.setNetworkSetting(networkSetting);

    // Set options that are not required.
    GeoTargetTypeSetting geoTarget = new GeoTargetTypeSetting();
    geoTarget.setPositiveGeoTargetType(GeoTargetTypeSettingPositiveGeoTargetType.DONT_CARE);
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.axis.v201402.cm.Feed

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.