During adding site links to campaign feed, I would like to set device preference for mobile to be checked. How can I do it with ad words API ?
platformOperand.stringValue = "Mobile";//it also can be set for "Desktop"
I tried to do it like this:
ConstantOperand platformOperand = new ConstantOperand();
platformOperand.stringValue = "Mobile";//it also can be set for "Desktop"
platformOperand.type = ConstantOperandConstantType.STRING;
Function platformFunction = new Function();
platformFunction.lhsOperand = new FunctionArgumentOperand[] {
platformRequestContextOperand };
platformFunction.@operator = FunctionOperator.EQUALS;
platformFunction.rhsOperand = new FunctionArgumentOperand[] {
platformOperand };
and then it combined in function with links ids from google service and mutated for campaign feed service. No exception and link added but when I enter to link edit, "Mobile" option remain unmarked.
Please advise.
I found the answer: you shuld set devicePreference when you set propertes for FeedItem:
and this is most important part:
if you wondering what the meaning of 30001L, it's device criteria IDs according to adwords API See https://developers.google.com/adwords/api/docs/appendix/platforms