Hi,

Please find your answers for your questions below:

*1. Why does the first query work with just a single campaign filter, but 
the second one fails with multiple campaign filters?*

The reason the first query is worked is because the item_id '213126' is 
appropriate with the campaign '18267422150' from the account '5680872613'. 
To assist you further, could you provide us with the customer Id and 
item_id of which the campaign '11762092245'  belongs too.

*2.  On this note from your previous response:*

Could you confirm whether the current_state refer to the current_date? If 
yes, according to the shopping_product 
<https://developers.google.com/google-ads/api/fields/v20/shopping_product>, 
Note 
that segmentation by date segments is not permitted and will return 
UNSUPPORTED_DATE_SEGMENTATION error. I would suggest referring to the 
product_metrics 
filter by account level 
<https://developers.google.com/google-ads/api/docs/shopping-ads/reporting#product_metrics_filtered_by_date_account_level>

*3. Can you please respond to this question??*

Yes, filtering on the campaign.id value is not supported and you need to 
use the resource name. I would suggest referring to the 
product_statues(campaign_level)  
<https://developers.google.com/google-ads/api/docs/shopping-ads/reporting#product_statuses_campaign_level>to
 
know the sample query.

*4. Multi-Campaign Filtering:*

However the Multi-Campaign is supported and provided a combination of 
adgroup and campaign:

"query":"SELECT shopping_product.campaign, shopping_product.item_id, 
metrics.impressions FROM shopping_product WHERE shopping_product.item_id = 
'213126' AND shopping_product.campaign = 
'customers/5680872613/campaigns/18267422150' AND shopping_product.ad_group 
= 'customers/5680872613/adGroups/138238657582''"

Thanks,

Google Ads API Team.


On Thursday, July 17, 2025 at 9:43:58 AM UTC+5:30 srav...@optmyzr.com wrote:

> Hi Team,
>
> Yes, you’re right — the account doesn’t contain those campaigns. I had 
> added dummy IDs for reference.
>
> The following query *works*:
> sql
> CopyEdit
> SELECT shopping_product.campaign, shopping_product.item_id, 
> metrics.impressions FROM shopping_product WHERE shopping_product.item_id = 
> '213126' AND shopping_product.campaign = 'customers/5017448580 
> <(501)%20744-8580>/campaigns/{campaignId}' 
>
> However, this one *fails*:
> sql
> CopyEdit
> SELECT shopping_product.campaign, shopping_product.item_id, 
> metrics.impressions FROM shopping_product WHERE shopping_product.item_id = 
> '213126' AND shopping_product.campaign IN ( 'customers/5017448580 
> <(501)%20744-8580>/campaigns/{campaignId1}', 'customers/5017448580 
> <(501)%20744-8580>/campaigns/{campaignId2}' ) 
>
> Also, I haven’t included any ad_group filter.
>
> My questions:
>
> *1. Why does the first query work with just a single campaign filter, but 
> the second one fails with multiple campaign filters?*
> It seems inconsistent if a single campaign filter works but multiple (via 
> IN) don’t. Could you please clarify the expected behavior?
>
> *2.  On this note from your previous response:*
>
> “Note that historical performance mapping to that campaign doesn’t appear 
> in the shopping_product report.”
>
> Does this mean we *cannot get performance metrics* (e.g., impressions) 
> for a campaign when it dereferenced it in current state ?? 
>
> *3. Can you please respond to this question??*
>
>    1. 
>    
>    
>
>
>
> *Campaign ID Filter Inconsistency Queries using the syntax campaign.id 
>    <http://campaign.id/> = {value} fail with error -  
>    { "shoppingProductError": "MISSING_CAMPAIGN_FILTER" }    , while using the 
>    full resource name (e.g., shopping_product.campaign = 
>    "customers/{accountId}/campaigns/{id}") works. ➤ *
> *Is there a reason for this behavior, and should we always prefer full 
>    resource names over IDs? *
>    
> *4. Multi-Campaign Filtering:*
> Could you please share a *working sample query* that demonstrates how to 
> filter the shopping_product resource by multiple campaigns?
>
> Thanks again for your continued help!
> On Monday, July 14, 2025 at 2:06:32 PM UTC+5:30 Google Ads API Forum 
> Advisor wrote:
>
>> Hi,
>>
>> Thank you for reaching out to the Google Ads API support team.
>>
>> Upon checking the provided information, I understand that you are 
>> encountering an *MISSING_CAMPAIGN_FILTER* 
>> <https://developers.google.com/google-ads/api/reference/rpc/v17/ShoppingProductErrorEnum.ShoppingProductError#missing_campaign_filter>
>>  
>> error while retrieving the data from the *shopping_product* 
>> <https://developers.google.com/google-ads/api/fields/v17/shopping_product?hl=en>
>>  
>> resource using the Google Ads API. This error means a filter on the 
>> campaign resource name is missing. Both the campaign and ad group must be 
>> specified in the WHERE clause. If one or other is not present, this will 
>> result in one of the following errors: MISSING_CAMPAIGN_FILTER and 
>> MISSING_AD_GROUP_FILTER. As you are including both campaign and ad_group in 
>> the 'SELECT' clause of your GAQL query you need to filter the 'WHERE' 
>> clause with campaign and ad_group resources. I would recommend you to refer 
>> to this *guide* 
>> <https://developers.google.com/google-ads/api/docs/shopping-ads/reporting#:~:text=Note%3A%20Both%20the%20campaign%20and%20ad%20group%20must%20be%20specified%20in%20the%20WHERE%20clause.%20If%20one%20or%20other%20is%20not%20present%2C%20this%20will%20result%20on%20of%20the%20following%20errors%3A%20MISSING_CAMPAIGN_FILTER%20and%20MISSING_AD_GROUP_FILTER.>
>>  
>> for more information. 
>>
>> Please be informed that specifying the report with a date or date range 
>> in the WHERE clause will return metrics for all products at the account 
>> level which are (regardless of whether the metrics are non-zero) for the 
>> specified time period. You cannot select segments.date, doing so would 
>> result in an *UNSUPPORTED_DATE_SEGMENTATION* 
>> <https://developers.google.com/google-ads/api/reference/rpc/v17/ShoppingProductErrorEnum.ShoppingProductError#unsupported_date_segmentation>
>>  
>> error. I would suggest you refer to the '*Product metrics, filtered by 
>> date (Account level)* 
>> <https://developers.google.com/google-ads/api/docs/shopping-ads/reporting#product_metrics_filtered_by_date_account_level>'
>>  
>> documentation for more information.
>>
>> Note that historical performance mapping to that campaign doesn’t appear 
>> in the *shopping_product* 
>> <https://developers.google.com/google-ads/api/fields/v17/shopping_product?hl=en>
>>  
>> report. I have checked your Google Ads account, I could see the campaign 
>> Ids you mentioned are not present in your account even with ‘REMOVED’ 
>> status.
>>
>> Thanks,
>>   
>> [image: Google Logo] Google Ads API Team 
>> Feedback
>> How was our support today? 
>>
>> [image: rating1] 
>> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=1&entry.295079254=500Ht00001svXYhIAM>
>>   
>>   [image: rating2] 
>> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=2&entry.295079254=500Ht00001svXYhIAM>
>>   
>>   [image: rating3] 
>> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=3&entry.295079254=500Ht00001svXYhIAM>
>>   
>>   [image: rating4] 
>> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=4&entry.295079254=500Ht00001svXYhIAM>
>>   
>>   [image: rating5] 
>> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=5&entry.295079254=500Ht00001svXYhIAM>
>> [2025-07-14 08:35:59Z GMT] This message is in relation to case 
>> "ref:!00D1U01174p.!500Ht01svXYh:ref" (ADR-00318780)
>>
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 visit 
https://groups.google.com/d/msgid/adwords-api/ad50e545-ab27-4a97-a926-76e2ea14d868n%40googlegroups.com.
  • Qu... 'Sravanthi Reddy' via Google Ads API and AdWords API Forum
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Google Ads API and AdWords API Forum

Reply via email to