Setting CPC bid in shopping campaign

196 views
Skip to first unread message

Bill Smith

unread,
Jul 30, 2014, 4:25:38 PM7/30/14
to adwor...@googlegroups.com
Hi-

I'm using API 201402 successfully to update bids (basic CPC) for traditional text ads, using the PHP library example as a guide.  Here's the basic code:

-------

$adGroupCriterionService = $user->GetService('AdGroupCriterionService', ADWORDS_VERSION);
$criterion = new Criterion();
$criterion->id = $keywordCriterionId;

$biddableAdgroupCriterion = new BiddableAdGroupCriterion();
$biddableAdgroupCriterion->adGroupId = $adGroupId;
$biddableAdgroupCriterion->criterion = $criterion;

$CPCbid = new CpcBid();
$CPCbid->bid = new Money($microBid);

$biddingStrategyConfiguration = new BiddingStrategyConfiguration();
$biddingStrategyConfiguration->bids = $CPCbid;
$biddableAdgroupCriterion->biddingStrategyConfiguration = $biddingStrategyConfiguration;

$operation = new AdGroupCriterionOperation();
$operation->operand  = $biddableAdgroupCriterion;
$operation->operator = 'SET';

$operations = array($operation);
$result = $adGroupCriterionService->mutate($operations);

------

I have transitioned our PLA campaigns to thew new Shopping Campaigns and would like to perform the same function using the API.  Our bids are split into multiple ad groups, and the ad groups can go up to 3 levels deep on product type.  For example:

Campaign: Apparel
Ad Group: Shoes
Product Type: Mens > Athletic > Basketball
Product Type: Mens > Athletic > Soccer
etc.

I would like to be able to retrieve the current data from the campaign (in case someone make changes in the AdWords UI and I need to sync our local database), as well as be able to update the bid using the API.

I was assuming I still use the BiddingStrategyConfiguration for this operation but I'm having trouble understanding how the above code would change for a shopping campaign.

Thanks,

Bill


Sérgio Gomes (Shopping API Team)

unread,
Aug 1, 2014, 9:29:22 AM8/1/14
to adwor...@googlegroups.com
Hi Bill,

Shopping campaigns work quite differently, based on the principle of partitions. We have a guide explaining how to set up a shopping campaign.

Hope this helps!

Cheers,
Sérgio

---
Sérgio Gomes
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902

Bill Smith

unread,
Aug 7, 2014, 11:27:15 AM8/7/14
to adwor...@googlegroups.com
Hi-

My shopping campaigns are already set-up, and I have the partitions created.  But I do see anything in the guide that discusses modifying bids.  Am I missing something or perhaps is that not supported in the API?

Bill

Sérgio Gomes (Shopping API Team)

unread,
Aug 8, 2014, 6:21:44 AM8/8/14
to adwor...@googlegroups.com
Hi Bill,

Oh, I see, sorry I didn't get your question in the first place. Yes, you modify bids in the exact same way as you would ones in normal campaigns, by modifying the BiddingStrategyConfiguration for the ad group criteria.

Bear in mind that in this tree structure only the bids on the leaves matter, though. Any node which is of partition type SUBDIVISION will see its bid ignored, as due to the way trees need to be set up all bids will end up in one of its leaves (whether it's a specific value leaf or an "Other" leaf).

Cheers,
Sérgio

---
Sérgio Gomes
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902

Gustavo Schlaien

unread,
Nov 5, 2014, 10:29:27 AM11/5/14
to adwor...@googlegroups.com
Hi Sergio

I do understand the part in which we can modify the bids as any other AdGroup Criterion. After all  ProductPartition is at same level as Keyword, both being of the type Adgroup Criterion.
Problem is the following:

I dont know how to get the Google ID from Product Partition for a certain product.
If i query them all i can see a few details of them but not the name (which i use as a reference).

Please could you share some piece of code on to how to modify bids of a product partition knowing its OFFER ID and TEXT?

Thanks!!! :)

Josh Radcliff (AdWords API Team)

unread,
Nov 5, 2014, 5:38:32 PM11/5/14
to adwor...@googlegroups.com
Hi Gustavo,

Please check out my reply to your other post and let me know if you have any follow-up questions.

Thanks,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages