Unable to get FinalUrls of keyword using API

46 views
Skip to first unread message

Sarvagya Pandey

unread,
Aug 8, 2017, 3:36:25 AM8/8/17
to AdWords API Forum, Sarvagya Pandey
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
)

Vincent Racaza (AdWords API Team)

unread,
Aug 8, 2017, 4:45:48 AM8/8/17
to AdWords API Forum, sarvagy...@vtnetzwelt.com
Hi Sarvagya,

Could you provide your clientCustomerId and SOAP request and response logs so I can check this issue further? If you haven't enabled the SOAP logs yet, you can enable it by following the 'Configure logging' section of this document. Please use the Reply privately to author option when replying.

Thanks,
Vincent
AdWords API Team

Vincent Racaza (AdWords API Team)

unread,
Aug 14, 2017, 5:19:03 AM8/14/17
to AdWords API Forum, sarvagy...@vtnetzwelt.com
Hi Sarvagya,

A gentle follow up on this.

Could you confirm if you are still facing this issue? If you can confirm this, then kindly provide your clientCustomerID as well as your SOAP request and response logs (Reply privately to author).
Reply all
Reply to author
Forward
0 new messages