Please Let me Know How can i make Mobile App Campaign

74 views
Skip to first unread message

Jun Sung Kim

unread,
Apr 20, 2016, 9:02:41 AM4/20/16
to AdWords API Forum

I try to make APP Mobile Campaign. but if i regist mobileApplication i always got 'faultString: [CriterionError.CANNOT_ADD_CRITERIA_TYPE @ operations[3].operand.criterion]' Message.

What thing i miss? Please Let me know

BudgetServiceInterface budgetService =
adWordsServices.get(session,BudgetServiceInterface.class);

Budget sharedBudget = new Budget();
sharedBudget.setName("Test budget");

Money budgetAmount = new Money();
budgetAmount.setMicroAmount(50000000L);

sharedBudget.setAmount(budgetAmount);
sharedBudget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
sharedBudget.setIsExplicitlyShared(false);

BudgetOperation budgetOperation = new BudgetOperation();
budgetOperation.setOperand(sharedBudget);
budgetOperation.setOperator(Operator.ADD);

Long budgetId = budgetService.mutate(new BudgetOperation[] {budgetOperation}).getValue(0).getBudgetId();


CampaignServiceInterface campaignService =
adWordsServices.get(session,CampaignServiceInterface.class);

Campaign campaign = new Campaign();
campaign.setName("Test Cam");
campaign.setStatus(CampaignStatus.PAUSED);

BiddingStrategyConfiguration biddingStrategyConfiguration = new BiddingStrategyConfiguration();
biddingStrategyConfiguration.setBiddingStrategyType(BiddingStrategyType.TARGET_CPA);

Money bidMoney = new Money();
bidMoney.setMicroAmount(10000000L);

TargetCpaBiddingScheme biddingScheme = new TargetCpaBiddingScheme();
biddingScheme.setTargetCpa(bidMoney);



biddingStrategyConfiguration.setBiddingScheme(biddingScheme);
campaign.setBiddingStrategyConfiguration(biddingStrategyConfiguration);

campaign.setStartDate(new DateTime().plusDays(1).toString("yyyyMMdd"));
campaign.setEndDate(new DateTime().plusDays(30).toString("yyyyMMdd"));
campaign.setAdServingOptimizationStatus(AdServingOptimizationStatus.OPTIMIZE);
//campaign.setFrequencyCap(new FrequencyCap(5L,TimeUnit.DAY,Level.ADGROUP));

campaign.setAdvertisingChannelType(AdvertisingChannelType.DISPLAY);
campaign.setAdvertisingChannelSubType(AdvertisingChannelSubType.DISPLAY_MOBILE_APP);

Budget budget = new Budget();
budget.setBudgetId(budgetId);

campaign.setBudget(budget);
CampaignOperation operation = new CampaignOperation();
operation.setOperand(campaign);
operation.setOperator(Operator.ADD);


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

CampaignReturnValue result = campaignService.mutate(operations);


Long uid = result.getValue(0).getId();


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

OperatingSystemVersion osVersion = new OperatingSystemVersion();
osVersion.setId(630277L);
Location korea = new Location();
korea.setId(2410L);
Language korean = new Language();
korean.setId(1012L);
MobileApplication mobileApplication = new MobileApplication();
mobileApplication.setAppId("2-com.nhnent.payapp");
mobileApplication.setDisplayName("PAYCO ");

List<Criterion> criterionList = Lists.newArrayList(osVersion,korea,korean,mobileApplication);

List<CampaignCriterionOperation> criterionOperations = new ArrayList<CampaignCriterionOperation>();
criterionList.forEach(value -> {
CampaignCriterionOperation tmpOperation = new CampaignCriterionOperation();
CampaignCriterion tmpCriterion = new CampaignCriterion();
tmpCriterion.setCampaignId(uid);
tmpCriterion.setCriterion(value);
tmpOperation.setOperand(tmpCriterion);
tmpOperation.setOperator(Operator.ADD);
criterionOperations.add(tmpOperation);
});

CampaignCriterionReturnValue campaignCriterionRetVal = campaignCriterionService.mutate(criterionOperations.toArray(new CampaignCriterionOperation[criterionOperations.size()]));


Anthony Madrigal

unread,
Apr 20, 2016, 9:37:51 AM4/20/16
to AdWords API Forum
Hello,

The reason you are seeing the CANNOT_ADD_CRITERIA_TYPE error is because MobileApplications cannot be targeted on the campaign level. You need to target them from an ad group level. Here is a chart of all the criteria. It shows whether you can include or exclude them from the campaign or ad group level.

Cheers,
Anthony
AdWords API Team

Anthony Madrigal

unread,
Apr 20, 2016, 9:38:29 AM4/20/16
to AdWords API Forum

Jun Sung Kim

unread,
Apr 20, 2016, 8:18:57 PM4/20/16
to AdWords API Forum




Thank you for your Answer, but i have one more question. i saw chart of all the criteria.


















So i  think that there is some Campaign Display Object but i cannot find that.

























I just set Mobile App this section. So if you have any examples, please support me. Thank you


2016년 4월 20일 수요일 오후 10시 37분 51초 UTC+9, Anthony Madrigal 님의 말:
Message has been deleted

Anthony Madrigal

unread,
Apr 21, 2016, 10:02:23 AM4/21/16
to AdWords API Forum
Hello,

From the chart, it means that Mobile Applications can only be excluded from campaigns with Display type. I am not able to translate what you have highlighted in your second image.

Regards,
Anthony
AdWords API Team
Reply all
Reply to author
Forward
Message has been deleted
0 new messages