Cannot set ProductBiddingCategory for campaign, category ID is converting to exponential

36 views
Skip to first unread message

Veronica Mihaela

unread,
Aug 9, 2017, 10:37:31 AM8/9/17
to AdWords API Forum

Hi,
I my application I create Shopping campaigns using the google api. For the inventory filter I want to set ProductBiddingCategory. I have a config with the ids. For example for first level, 'BIDDING_CATEGORY_L2', I have this list:

'category1stLevel' => array(
'-7183678771116356049' => 'Animals & Pet Supplies',
'-8901225909846585574' => 'Arts & Entertainment ',
'-135859741832737125' => 'Baby & Toddler',
'1630781044279653237' => 'Business & Industrial',
'-4047358871470385303' => 'Cameras & Optics',
'-3692872870547437690' => 'Clothing & Accessories',
'-8991081036712453473' => 'Electronics',
'-4844290245982195030' => 'Food, Beverages & Tobacco',
'5791209622805759532' => 'Furniture',
'1689639310991627077' => 'Hardware',
'-1319082945867661876' => 'Health & Beauty',
'-730821788104646261' => 'Home & Garden',
'-5914235892932915235' => 'Luggage & Bags',
'513743549703189181' => 'Mature',
'-823909673284230433' => 'Media',
'7477391641924216366' => 'Office Supplies',
'225849170806580462' => 'Religious & Ceremonial ',
'-7974890371279108093' => 'Software',
'6085370270382652056' => 'Sporting Goods',
'-136928849880388598' => 'Toys & Games',
'-7701278134223972650' => 'Vehicles & Parts'
)

Fragment of code where I set:
$value = new ProductBiddingCategory();
$value->setType('BIDDING_CATEGORY_L1');
$value->setValue(-7183678771116356049);
$productScope->setDimensions([$value]);


As I see value must be an int, but it seems that php makes it exponential number(-7.7183678771116E+18) and the I suppose it converts to int but it is a value like -7183678771116355890. It is not the one
from beginning so it is not valid. If I do like this $value->setValue(-7.7183678771116E+18) it also does not work. I use 201705 version. In 201702 was working if was giving value like that '-7183678771116356049'.
Noe it does not work anymore.

How should I set to work? 

Thanks

Shwetha Vastrad (AdWords API Team)

unread,
Aug 9, 2017, 1:58:17 PM8/9/17
to AdWords API Forum
Hi Veronica, 

Could you provide the following details?
  • PHP version and if you are using 32-bit or 64-bit PHP
  • PHP client library version
Could you also enable logging and provide the SOAP request and response so I can check if the values are being passed correctly? Please use Reply privately to author when responding. 

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