Thank you for your answer, I have other question:
using the function *search() * or *searchStream()* is the right way to 
retrieve info?

$googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient();
$query = "SELECT customer.id, customer.descriptive_name, ad_group.id, 
ad_group.name FROM ad_group WHERE ad_group.id = AD_GROUP_ID LIMIT 1";
$response = $googleAdsServiceClient->searchStream('????' $query); // is 
this line right?

foreach ($response->iterateAllElements() as $googleAdsRow) {
$customers[] = [
'customer_client.id' => $googleAdsRow->getCustomerClient()->getId(),
];
}
 because I got empty response... and maybe is another way to get the info.

I don't have the customer_id value (so that's why I put '???' I don't know 
exactly if I am using the right function), only I got ad_group_id value

Thank you!

On Friday, May 5, 2023 at 3:57:37 AM UTC-6 Google Ads API Forum Advisor 
wrote:

> Hi Jessica,
>
> Thank you for responding back with the additional context of your concern.
>
> As per your use case, customer is an attributed resources of ad_group 
> report so you should be able to retrieve the customer fields from ad_group 
> report. Here's an example query for your reference.
>   
>
>
> SELECT customer.id, customer.descriptive_name, ad_group.id, ad_group.name 
> FROM ad_group WHERE ad_group.id = 'AD_YOUR_ADGROUP_ID_HERE'
>
>
> Regards,
>
> [image: Google Logo] Google Ads API Team 
>
> ref:_00D1U1174p._5004Q2lA73z:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/e79ae6b0-4a95-4585-b3ab-bdbd3ae69cccn%40googlegroups.com.
  • Ge... Jessica Villa
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Jessica Villa
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
          • ... Jessica Villa
          • ... Jessica Villa
            • ... Jessica Villa
              • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to