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. 

 

https://developers.google.com/adwords/api/docs/samples/php/shopping-campaigns#build-a-product-partit...
 
<https://developers.google.com/adwords/api/docs/samples/php/shopping-campaigns#build-a-product-partition-tree-for-an-ad-group%C2%A0>

https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupCriterionService.ProductDime...
 
<https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupCriterionService.ProductDimension%C2%A0>

 

Thank you, any help is appreciated. 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
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.
  • Google ... ryant
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
    • Re... ryant

Reply via email to