Hi,
I am currently trying to work with the Google Ad's API to run Ad's on our Shopping Products.
We want to use a PHP script to automatically set the Bid's each day for the products New and Refurbished depending on our stock.
I have all the Keys / API Access.
Manual Process - Works As Required
First we add an Ad Group to our Campaign
Then we add Sub Division's in the Ad Group for each product.
Then we add another Sub Division for New / Refurbished on each of the product Sub Divisions.
Now we can set Ad's max CPC for both New & Refurbished Products
The Problem with this
So the above allows us to setup the campaigns how we want however we have over 5,000 products and the stock changes daily so it's taking a huge amount of time to manage just a small % of our products.
API Problem
We began using the Google PHP API for Adwords so that we could potentially run a script and the New / Used max CPC would changed based on stock price.
However, the API creates the Ad Group and then I can create the Sub Divisions but where in Google Adwords we could manually set the divisions the Google API is only allowing us to create a division based on the product brand.
Here is the code where it creates the Product Division / Partition <- Bit confusing as Adwords calls them Sub Divisions and API uses Product Partitions.
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;
$otherCondition = ProductPartitions::createSubdivision(
$root,
new ProductCanonicalCondition()
);
$criterion = ProductPartitions::asBiddableAdGroupCriterion(
$adGroupId,
$otherCondition
);
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;
$coolBrand = new ProductBrand();
$coolBrand->setValue('Product Brand'); ///WE WANT PRODUCT ID HERE NOT BRAND
$coolBrandUnit = ProductPartitions::createUnit($otherCondition, $coolBrand);
$criterion = ProductPartitions::asBiddableAdGroupCriterion(
$adGroupId,
$coolBrandUnit,
900000
);
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;Is there anybody that could help or provide me with some better documentation. Currently I have been using the below links and still can't figure it out.
Thank you, any help is appreciated.
Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/bbbc5f66-1d9f-4a36-9b05-febbbbb49278%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.