Shopping performance report error

24 views
Skip to first unread message

Romain

unread,
Oct 15, 2024, 9:37:18 AM10/15/24
to Google Ads API and AdWords API Forum
Hello,

I would like to fetch product performance for a given merchant center id and period.

Here is my GAQL :

SELECT
metrics.conversions, metrics.impressions, metrics.cost_micros, metrics.clicks, metrics.conversions_value,
segments.device, segments.product_item_id, segments.product_merchant_id
FROM
shopping_performance_view
WHERE
segments.product_merchant_id = 12345678
AND segments.date BETWEEN '2024-01-01' AND '2024-06-31'

The query builder return me as error:

Malformed operand: "12345678 AND segments.date BETWEEN '2024-01-01' AND '2024-06-31'". Filtering conditions on the "segments.product_merchant_id" field using the "=" operator must contain an operand that takes the format of an integer.

I don't really understand why I'm getting this error because I'm actually using an integer for the merchant center ID.

Thanks for your help :)


Google Ads API Forum Advisor

unread,
Oct 15, 2024, 1:39:14 PM10/15/24
to adwor...@googlegroups.com
Hi,

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

Based on the information provided, it appears that you have specified the date range as '2024-01-01' to '2024-06-31'. Please be aware that June only has 30 days. To retrieve product performance data for a specific merchant center ID and period, you can try the following modified query:
SELECT metrics.conversions, metrics.impressions, metrics.cost_micros, metrics.clicks, 
metrics.conversions_value, segments.device, segments.product_item_id, 
segments.product_merchant_id, segments.date 
FROM shopping_performance_view 
WHERE segments.date BETWEEN '2024-01-01' AND '2024-06-30' AND segments.product_merchant_id IN (12345678)
Additionally, you can utilize the Query Builder and Query Validator to build and validate your queries. To retrieve Google Ads API entities and reporting data, you can use one of these Rest Interface methods like GoogleAdsService.SearchStream or GoogleAdsService.Search.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGeYj:ref" (ADR-00271803)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages