Hour wise ad cost for item query

64 views
Skip to first unread message

Vipul G

unread,
Jul 17, 2023, 7:11:09 AM7/17/23
to Google Ads API and AdWords API Forum
Hello 
            I am expecting hour wise ad cost for items. currently I have created below query:
SELECT
segments.product_item_id,
segments.date
FROM shopping_performance_view
WHERE segments.date = '2023-01-05' AND segments.hour = 2

I am getting error like this, 'segments.hour' is not a valid field in the WHERE clause when 'shopping_performance_view' is the resource in the FROM clause. Fields in the WHERE must be 'Filterable'.

is there any way to achieve this ?

Google Ads API Forum Advisor

unread,
Jul 17, 2023, 9:31:35 AM7/17/23
to vipulgoran...@gmail.com, adwor...@googlegroups.com

Hi Vipul,

Thank you for reaching out to us.

Upon checking, I could confirm that 'segments.hour' is not a valid field in the WHERE clause when 'shopping_performance_view' is the resource in the FROM clause. To prevent this kind of error, You can use the exact shopping_performance_view builder (https://developers.google.com/google-ads/api/fields/v14/shopping_performance_view_query_builder?hl=en) to see its selectable and filterable fields. Also, I would recommend that you use the Google Ads Query Builder (https://developers.google.com/google-ads/api/fields/v14/overview_query_builder?hl=en) and Query Validator (https://developers.google.com/google-ads/api/fields/v14/query_validator?hl=en) tools for constructing queries.

On the other hand, for our team to further check and provide you with appropriate recommendations, could you please provide us with the entire UI screenshot without cropping, including its customer ID, where you can see the data you want to retrieve in the API?

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.
 

This message is in relation to case "ref:_00D1U1174p._5004Q2n8PjQ:ref"

Thanks,
 
Google Logo Google Ads API Team


Vipul G

unread,
Jul 18, 2023, 3:00:58 AM7/18/23
to Google Ads API and AdWords API Forum
I am expecting hour wise ad cost for items. Is there any way to achieve this ?

Let say for item "X", I want to see hourly ad spend !
I can see day wise ad cost for items but I want more detail break down of the ad cost 

Google Ads API Forum Advisor

unread,
Jul 18, 2023, 7:46:11 AM7/18/23
to vipulgoran...@gmail.com, adwor...@googlegroups.com

Hi,

Thanks for getting back to us.



I am expecting hour wise ad cost for items. Is there any way to achieve this ?

>> Can you confirm this is available in the Google Ads UI where you can filter by the hour in the same report? If yes, can you please share with us the whole Google Ads UI screenshot (without cropping)? We are asking for this because if this is available in the UI but not available in the API, we can create a feature request for this. You can provide it via the Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Reply all
Reply to author
Forward
0 new messages