$query = "SELECT 
segments.keyword.info.text,segments.keyword.info.match_type, 
segments.search_term_match_type, metrics.conversions, metrics.clicks, 
metrics.cost_micros FROM search_term_view WHERE segments.date BETWEEN '" . 
$this->start_time . "' AND '" . $this->end_time . "'";
$stream = $this->googleAdsServiceClient->searchStream(
$this->customerId,
$query
);
foreach ($stream->iterateAllElements() as $googleAdsRow) {
$segments = $googleAdsRow->getSegments();
$metrics = $googleAdsRow->getMetrics();
$keywordText = $segments->getKeyword()->getInfo()->getText();
$clicks = $metrics->getClicks();

$conversions = $metrics->getConversions();
$costMicros = $metrics->getCostMicros();
$data[] = [
'keywordText' => $keywordText,
'clicks' => $clicks,
'conversions' => $conversions,
'costMicros' => $costMicros
];


}
return $data;

在2022年6月6日星期一 UTC+8 21:08:17<adsapi> 写道:

> Hi Dai,
>
> Thank you for reaching out to the Google Ads API team.
>
> Moving forward to your concern, it appears that this is about the 
> difference in the data. With this, so our team can better check and 
> investigate this issue, could you provide the complete request 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#request>
>  
> and response 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#response>
>  
> logs with request ID 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id>
>  
> and request header 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers>
>  generated 
> on your end?
>
> You can provide it via *Reply privately to author *option. If this option 
> is not available, then send it instead on this email address 
> googleadsa...@google.com 
> <https://mail.google.com/mail/u/0/?fs=1&tf=cm&source=mailto&to=googleadsapi-supp...@google.com>
> .
>
> Regards,
> [image: Google Logo] 
> Carmela 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2bcZOL: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/364fcfec-d3a2-46ec-9bb6-ab804f6ba6fbn%40googlegroups.com.
  • wh... dai yong
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... dai yong

Reply via email to