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
)
)
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/2db6b15d-df8c-4eb4-929f-73b2a3fcb9f3o%40googlegroups.com.