shopping_performance_view getSegments()

2022-01-12 Thread John
Hi,

I'm trying to get the shopping_performance_view report to return the same 
data that I used to get with the SHOPPING_PERFORMANCE_REPORT in the old API 
but I'm not able to have getSegments() return anything for extracting the 
product_item_id

I'm passing the following query

SELECT campaign.id, metrics.clicks, metrics.cost_micros, 
segments.product_item_id, metrics.conversions, metrics.impressions, 
metrics.search_impression_share, metrics.conversions_value FROM 
shopping_performance_view WHERE segments.date BETWEEN '20211212' AND 
'20220111'

In this example $segments return null whereas $metrics returns all the 
methods I need to extract data from it. 

foreach ($stream->iterateAllElements() as $googleAdsRow) {
$metrics = $googleAdsRow->getMetrics();
$segments = $googleAdsRow->getSegments();
}

I assume I'm missing something obvious. Can someone please point me in the 
right direction so that I can get the product_item_id along with all the 
associated metrics?

Thanks,

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/7ad708aa-9610-4cbb-a4f9-21458aef1e0cn%40googlegroups.com.


RE: shopping_performance_view getSegments()

2022-01-12 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi John,

Thank you for reaching out to our API support team.

So our team can take a closer look, could you also share the generated and 
complete request and response logs, with the request-id and login-customer-id? 
This is so that our team can replicate your report on our end and check whether 
there are indeed values being returned, and if this could also possibly be a 
client library related issue.

If you haven't yet, logging can be enabled by navigating to the Client 
libraries > Your client library (ex. Java) > Logging documentation, which you 
can access from this link. If it is PHP you are using, you can refer directly 
to this PHP logging guide.

You may then send the requested information via the Reply privately to author 
option. If this option is not available, you may send the details directly to 
our googleadsapi-supp...@google.com alias instead.

Best regards,

Peter Laurence Napa Oliquino
Google Ads API Team
ref:_00D1U1174p._5004Q2UjNCA: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/m37gq0R5MOU700uXwkQa5dRsuVLW_84jPH8w%40sfdc.net.


Re: shopping_performance_view getSegments()

2022-01-13 Thread John
Thanks for the response.

I figured out where I was going wrong. 

The first row returned didn't have an item id so there were no segments 
available. I incorrectly assumed that this would be the case for all 
returned rows but as it turns out every other row does allow me to extract 
the segments and retrieve the item id. 

I'm not sure how a shopping click isn't being associated with a product id 
but never mind. Now that i know, I can work around it.

Cheers.

On Thursday, 13 January 2022 at 03:11:14 UTC adsapi wrote:

> Hi John,
>
> Thank you for reaching out to our API support team.
>
> So our team can take a closer look, could you also share the generated and 
> complete request 
> 
>  
> and response 
> 
>  
> logs, with the request-id 
> 
>  
> and login-customer-id 
> ?
>  
> This is so that our team can replicate your report on our end and check 
> whether there are indeed values being returned, and if this could also 
> possibly be a client library related issue.
>
> If you haven't yet, logging can be enabled by navigating to the *Client 
> libraries > Your client library (ex. Java) > Logging* documentation, 
> which you can access from this link 
> . If it is 
> PHP you are using, you can refer directly to this PHP logging 
>  
> guide.
>
> You may then send the requested information via the *Reply privately to 
> author* option. If this option is not available, you may send the details 
> directly to our googleadsa...@google.com alias instead.
>
> Best regards,
>
> [image: Google Logo] 
> Peter Laurence Napa Oliquino 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2UjNCA: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/a739acbf-c154-4428-9f6c-98932e0e13cbn%40googlegroups.com.