Unable to segment product performance data by date or month

45 views
Skip to first unread message

Hashcrypt Hash

unread,
Jun 10, 2025, 6:19:22 AMJun 10
to Google Ads API and AdWords API Forum
Hi,

I want to fetch product performance data. I've referred shopping ads reporting documentation

1. I used Shopping Performance View. but in that data isn't matching with google ads dashboard

Query we've used:
SELECT segments.product_item_id,segments.product_title, segments.product_channel,  metrics.clicks,  metrics.cost_micros,  metrics.impressions,  metrics.conversions, metrics.all_conversions, segments.month, segments.date FROM shopping_performance_view  WHERE segments.date >='" . $start_date . "' and segments.date <='" . $end_date . "' and metrics.cost_micros > 0 ORDER BY segments.date DESC

2. I used  Shopping Product. in that I tested with campaign filter and date filter and we're getting correct result as per the dashboard

Query we've used:
SELECT shopping_product.resource_name, shopping_product.campaign, campaign.name, shopping_product.channel, shopping_product.item_id, shopping_product.status, shopping_product.title, metrics.clicks, metrics.cost_micros, metrics.impressions FROM shopping_product WHERE shopping_product.campaign = 'customers/3886993576/campaigns/22146800790' AND segments.date >= '2025-03-01' AND segments.date <= '2025-03-31'

but in this there's issue like we're unable to segment data by date or month etc. Also it doesn't allow multiple campaign filteration

Is there any other resources available which can provide product performance with segmentation by date or month and with multiple campaign filter.?

Thanks.


Google Ads API Forum Advisor

unread,
Jun 10, 2025, 8:30:33 AMJun 10
to hashcr...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Based on the provided information, I understand that you would like to retrieve the product performance data with segmentation by date or month and with multiple campaign filters via the Google Ads API. I would recommend you refer to the given GAQL query below to retrieve the product performance data with segmentation by date and with multiple campaign filter conditions using the shopping_performance_view report:
SELECT segments.product_item_id, segments.product_title, 
campaign.id, segments.product_channel, metrics.clicks, 
metrics.cost_micros, metrics.impressions, metrics.conversions, 
metrics.all_conversions, segments.month, segments.date FROM 
shopping_performance_view WHERE segments.date 
BETWEEN 'YYYY-MM-DD' AND 'YYYY-MM-DD' AND metrics.cost_micros > 0 
AND campaign.id IN (campaign.id1, campaign.id2, campaign.id3)

I would request you please replace the campaign.id field that is present in the braces "campaign.id IN (campaign.id1, campaign.id2, campaign.id3)" with the campaign IDs for which you would like to retrieve the data. I have tried to retrieve the data using the above given GAQL query, and I'm able to retrieve the data successfully without any errors.

If you still need any further assistance, I request you kindly share the UI screenshot by highlighting the product performance data that you would like to retrieve via the Google Ads API.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-06-10 12:29:48Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01remjC:ref" (ADR-00313490)



Hashcrypt Hash

unread,
Jun 10, 2025, 12:44:37 PMJun 10
to Google Ads API and AdWords API Forum
Hello,

Thank you for responding quickly. I tried this query but it doesn't provide correct value. I checked impression value for march month.
Also, If possible I want to use shopping_product resource query because it provides whole performance of product (not just historial) whether it served the ads or not.

As per my understanding, shopping_performance_view providing historical stats of product. Let me know If I'm woring or there's any misunderstanding

Google Ads API Forum Advisor

unread,
Jun 10, 2025, 5:30:41 PMJun 10
to hashcr...@gmail.com, adwor...@googlegroups.com

Hi,

To check further and confirm, as requested earlier, kindly provide the uncropped Google Ads UI screenshot where the required data is presented, and the same you want to fetch via the API. This screenshot will help us to build the appropriate query and provide it to you.



You can send the details via Reply privately to the author option, or direct private reply to this email.

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-06-10 21:29:55Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01remjC:ref" (ADR-00313490)



Message has been deleted

Google Ads API Forum Advisor

unread,
Jun 11, 2025, 2:48:02 AMJun 11
to hashcr...@gmail.com, adwor...@googlegroups.com

Hi,

Please be informed that I have removed your response from the forums as it contains the PII information. By reviewing your query, I understand that you are getting the incorrect value for impressions for March month. As per provided screenshots, I could see that you want to retrieve the impressions of the product item for march and april months. Please use the below GAQL query to retrieve the impressions of the product item from the shopping_performance_view resource through the Google Ads API. 

SELECT segments.product_item_id, metrics.impressions, metrics.clicks, metrics.cost_micros, segments.product_title FROM shopping_performance_view WHERE segments.product_item_id = 'XXXXXXX' AND segments.date BETWEEN 'YYYY-MM-DD' AND 'YYYY-MM-DD'

You can use the search or searchStream methods in making the API calls while retrieving the data. Additionally, you can utilize the Google Ads Query Builder and Query Validator to build and validate the queries for retrieving the data from the Google Ads API. Additionally, please specify the product item ID and the start date and end date in the segments.date in the format of 'YYYY-MM-DD' for which dates you are trying to retrieve the data. I have tried to retrieve the data using the above GAQL query and I’m able to retrieve the ‘13533’ impressions for March month and ‘7623’ for April month.

Additionally, please note that both 'shopping_performance_view' and ' shopping_product' are able to return metrics at a product level. 'Shopping Performance View' will provide the 'historical' state of a product that has served ads, whereas 'Shopping Product' provides the current state of a product whether it has served ads or not. I would recommend you to refer to Reporting documentation for more detailed information.

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-06-11 06:47:15Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01remjC:ref" (ADR-00313490)



Reply all
Reply to author
Forward
0 new messages