Parent id missing in user interrest list

20 views
Skip to first unread message

denma test

unread,
Aug 21, 2020, 7:30:07 AM8/21/20
to AdWords API and Google Ads API Forum
I can get user interest targets of a Adgroup, there i can get interest id, name and other, but parent id is not returned, however i added this in selectors, attached selector code and response below,

Selector:
$adGroupId = intval($adGroupId);
        $targetData = array();
        $session = self::setSession();
        $adWordsServices = new AdWordsServices();
        $adGroupCriterionService = $adWordsServices->get($session, AdGroupCriterionService::class);
        $selector = new Selector();
        $selector->setFields(['Id', 'Text', 'CriteriaType', 'UserInterestParentId']);
        $selector->setPredicates(
            [
                new Predicate('AdGroupId', PredicateOperator::IN, [$adGroupId]),
                new Predicate(
                    'CriteriaType',
                    PredicateOperator::IN,
                    [
                        'USER_INTEREST',
                        'CUSTOM_AFFINITY'
                    ]
                )
            ]
        );

Response:

[0] => Google\AdsApi\AdWords\v201809\cm\BiddableAdGroupCriterion Object
                (
                    [userStatus:protected] => 
                    [systemServingStatus:protected] => 
                    [approvalStatus:protected] => 
                    [disapprovalReasons:protected] => 
                    [firstPageCpc:protected] => 
                    [topOfPageCpc:protected] => 
                    [firstPositionCpc:protected] => 
                    [qualityInfo:protected] => 
                    [biddingStrategyConfiguration:protected] => 
                    [bidModifier:protected] => 
                    [finalUrls:protected] => 
                    [finalMobileUrls:protected] => 
                    [finalAppUrls:protected] => 
                    [trackingUrlTemplate:protected] => 
                    [finalUrlSuffix:protected] => 
                    [urlCustomParameters:protected] => 
                    [adGroupId:protected] => 110335323727
                    [criterionUse:protected] => BIDDABLE
                    [criterion:protected] => Google\AdsApi\AdWords\v201809\cm\CriterionUserInterest Object
                        (
                            [userInterestId:protected] => 92505
                            [userInterestParentId:protected] => 
                            [userInterestName:protected] => Beauty Mavens
                            [id:protected] => 51668104135
                            [type:protected] => USER_INTEREST
                            [CriterionType:protected] => CriterionUserInterest
                            [parameterMap:Google\AdsApi\AdWords\v201809\cm\Criterion:private] => Array
                                (
                                    [Criterion.Type] => CriterionType
                                )

                        )

                    [labels:protected] => 
                    [forwardCompatibilityMap:protected] => 
                    [baseCampaignId:protected] => 
                    [baseAdGroupId:protected] => 
                    [AdGroupCriterionType:protected] => BiddableAdGroupCriterion
                    [parameterMap:Google\AdsApi\AdWords\v201809\cm\AdGroupCriterion:private] => Array
                        (
                            [AdGroupCriterion.Type] => AdGroupCriterionType
                        )

                )

Google Ads API Forum Advisor Prod

unread,
Aug 21, 2020, 3:15:02 PM8/21/20
to denm...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to us. Could you provide the whole request and response log for where you obtain your results so that I can further investigate?

Thank you,
Bryan, Google Ads API Team

ref:_00D1U1174p._5004Q23tbpj:ref
Reply all
Reply to author
Forward
0 new messages