Hello,
using the PHP Library v201402 and the Google Adwords API and the Content API for Shopping I want to create shopping campaigns with products from an Google Merchant Center Account.
Via the API I can generate campaigns and adgroups, but I can't create product partions (like productgroups) into the adgroup. Here is my code for the product partition:
$productPartition = new \ProductPartition('UNIT');
$adGroupCriterion = new \BiddableAdGroupCriterion();
$adGroupCriterion->criterion = $productPartition;
$adGroupCriterion->adGroupId = <adgroupId from the last generated adGroup>;
$operation = new \AdGroupCriterionOperation();
$operation->operand = $adGroupCriterion;
$operation->operator = 'ADD';
$operations = array($operation);
$adGroupCriterionService->mutate($operations);
Is this the right way to generate a product partition? I read the docs a lot of times but i don't know if this is right.
Can anyone help me?
Greetings from Germany