I'm using the TrafficEstimatorService to fetch some stats on keywords for
eventual campaign and custom reporting and during my testing i noticed that
when setting up my request my language criteria will overide my location
criteria if both are specified.
I can add location without language and the request will go through but if
i specify both then only the language parameter will be taken in account by
the request.
My code is very alike what is available in the google documentation so i
don't understand why would my first criteria be replaced by the second one.
Thanks for any help. I hope my question is formulated properly
Here is a bit of my code where criteria are set, I'm using the PHP Adwords
API client library v201705.
$campaignEstimateRequests = [];
$campaignEstimateRequest = new
\Google\AdsApi\AdWords\v201705\o\CampaignEstimateRequest();
$campaignEstimateRequest->setAdGroupEstimateRequests($adGroupArray);
$loc = new \Google\AdsApi\AdWords\v201705\cm\Location();
$loc->setId($location);
$campaignEstimateRequest->setCriteria([$loc]);
$lang = new \Google\AdsApi\AdWords\v201705\cm\Language();
$lang->setId($language);
$campaignEstimateRequest->setCriteria([$lang]);
$crit = new \Google\AdsApi\AdWords\v201705\cm\NetworkSetting();
$crit->setTargetGoogleSearch(true);
$crit->setTargetContentNetwork(false);
$crit->setTargetPartnerSearchNetwork(false);
$crit->setTargetSearchNetwork(false);
$campaignEstimateRequest->setNetworkSetting($crit);
$campaignEstimateRequests[] = $campaignEstimateRequest;
return $campaignEstimateRequests;
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords 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 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/fbe48877-d285-4418-b0fe-e68024922174%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.