Hi,
I am using PHP Adwords APIs to fetch the final urls of keywords but it
always returns null
*Code I am using:*
// Get the service, which loads the required classes.
$adGroupCriterionService = $adWordsServices->get($session,
AdGroupCriterionService::class);
// Create selector.
$selector = new Selector();
$selector->setFields(['KeywordText', 'KeywordMatchType',
'Id','Status','TopOfPageCpc','CpcBid','FinalUrls']);
$selector->setOrdering([new OrderBy('KeywordText', 'ASCENDING')]);
// Create predicates.
$selector->setPredicates([new Predicate('AdGroupId', PredicateOperator::IN,
[$adGroupId] )] );
$selector->setPredicates([new Predicate('CriteriaType',
PredicateOperator::IN, ['KEYWORD'] )] );
$selector->setPredicates([new Predicate('Id', PredicateOperator::IN,
[$keywordId] )] );
// Make the get request.
$page = $adGroupCriterionService->get($selector);
foreach ($page->getEntries() as $adGroupCriterion) {
var_dump($adGroupCriterion);
}
*Response :*
Google\AdsApi\AdWords\v201609\cm\BiddableAdGroupCriterion Object
(
[userStatus:protected] => ENABLED
[systemServingStatus:protected] =>
[approvalStatus:protected] =>
[disapprovalReasons:protected] =>
[destinationUrl:protected] =>
[firstPageCpc:protected] =>
[topOfPageCpc:protected] => Google\AdsApi\AdWords\v201609\cm\Bid Object
(
[amount:protected] => Google\AdsApi\AdWords\v201609\cm\Money
Object
(
[microAmount:protected] => 123456
[ComparableValueType:protected] =>
[ComparableValue.Type] => Money
)
)
[firstPositionCpc:protected] =>
[qualityInfo:protected] =>
[biddingStrategyConfiguration:protected] =>
Google\AdsApi\AdWords\v201609\cm\BiddingStrategyConfiguration Object
(
[biddingStrategyId:protected] =>
[biddingStrategyName:protected] =>
[biddingStrategyType:protected] => MANUAL_CPC
[biddingStrategySource:protected] =>
[biddingScheme:protected] =>
[bids:protected] => Array
(
[0] => Google\AdsApi\AdWords\v201609\cm\CpcBid Object
(
[bid:protected] =>
Google\AdsApi\AdWords\v201609\cm\Money Object
(
[microAmount:protected] => 12340000
[ComparableValueType:protected] =>
[ComparableValue.Type] => Money
)
[cpcBidSource:protected] => CRITERION
[BidsType:protected] =>
[Bids.Type] => CpcBid
)
)
)
[bidModifier:protected] =>
[finalUrls:protected] =>
[finalMobileUrls:protected] =>
[finalAppUrls:protected] =>
[trackingUrlTemplate:protected] =>
[urlCustomParameters:protected] =>
[adGroupId:protected] => 12343924932
[criterionUse:protected] => BIDDABLE
[criterion:protected] => Google\AdsApi\AdWords\v201609\cm\Keyword Object
(
[text:protected] => Test Keyword ABCD
[matchType:protected] => PHRASE
[id:protected] => 12343743102
[type:protected] => KEYWORD
[CriterionType:protected] =>
[Criterion.Type] => Keyword
)
[labels:protected] =>
[forwardCompatibilityMap:protected] =>
[baseCampaignId:protected] =>
[baseAdGroupId:protected] =>
[AdGroupCriterionType:protected] =>
[AdGroupCriterion.Type] => BiddableAdGroupCriterion
)
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/c7e47e70-8bc8-40ed-85fc-3d57fd45af8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.