RE: [rest api v19] metrics are zero or results are empty from resource views when filtering by date

77 views
Skip to first unread message
Message has been deleted

Google Ads API Forum Advisor

unread,
Jun 30, 2025, 11:18:27 AM6/30/25
to en...@wask.co, adwor...@googlegroups.com

Hi,

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

Please find the below responses for your queries:

1) Why would filtering by segments.date cause metrics to become zero for views like gender_view, even when data is present?

  • When segments.date is in SELECT clause the API filters out rows where all metrics for that specific gender AND date combination are zero. If a gender had no activity on that precise date, the row is omitted. When segments.date is only in WHERE the API returns the gender_view aggregated for the entire WHERE clause date range. If, for a specific gender, the sum of metrics for the selected fields across that filtered date range truly is zero, then you'll see zero metrics for that gender. I would like to inform you that when the impressions, clicks, and conversions are zero, that data won't be returned by the API. For more information, refer to the zero metrics.

2) Is this an expected behavior or a potential bug? It seems fundamentally incorrect that an API would return a resource for a date range but show none of its corresponding metrics for that same range.
  • Please be informed that this is an expected behavior. As informed, the documentation on zero metrics explicitly states zero metrics are always excluded when segmenting a report, provided all selected metrics are zero and dates with no metrics are not returned in such a report.
3) Are we required to structure our queries differently for these views compared to the campaign view to get accurate, date-filtered metrics?
  • If you only want to retrieve rows that have non-zero metrics, you can follow the sample GAQL shared below for your reference:
  • SELECT gender_view.resource_name, metrics.clicks, 
    metrics.impressions, segments.date, metrics.video_quartile_p100_rate,
    metrics.video_quartile_p25_rate, metrics.video_quartile_p50_rate, 
    metrics.video_quartile_p75_rate, metrics.video_views FROM gender_view 
    WHERE segments.date BETWEEN '2025-06-26' AND '2025-06-26' AND 
    metrics.clicks > 0 AND metrics.impressions > 0
You can send the details via Reply privately to the author option, or direct private reply to this email.

I hope this helps! Feel free to get back to us in case of any further queries.
 

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-06-30 15:17:40Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01rgfrw:ref" (ADR-00316499)



Enes Bulut

unread,
Jun 30, 2025, 7:33:17 PM6/30/25
to Google Ads API and AdWords API Forum
Hello again!

Thank you for the detailed explanation regarding the "zero metrics" behavior. I appreciate you clarifying how the API handles empty data.
However, I apologize if my original post was not clear enough. The issue we are facing is not that the metrics are genuinely zero. The core problem is that we are unable to retrieve any performance metrics from age_range_view and gender_view specifically for Performance Max and Smart campaigns.
Let me clarify with a more precise example:
Campaign View (Works): As shown in my previous screenshots, when we query the campaign view for a specific PMax campaign on a given date, we see significant, non-zero metrics (e.g., thousands of impressions and hundreds of clicks). This confirms the campaign is active and generating data.
Other Views (Work): We can successfully query other views like device_view or geographic_view for the same PMax campaign and same date range, and we receive correct, non-zero metrics broken down by device or location.
Age/Gender View (Fails): The problem occurs only when we query age_range_view or gender_view for that exact same PMax campaign. In this case, the API returns results with all metrics as "0" or an empty result set, even though we know the campaign itself has substantial performance data.
So, the central question is not about zero metrics in general, but about data availability for specific campaign types.
To put it directly: Is it a known limitation that the Google Ads API does not provide performance metric breakdowns for Performance Max or Smart campaigns when segmented by age_range_view and gender_view?
The data clearly exists at the campaign level, but it seems to be unavailable or inaccessible when we request a demographic breakdown for these automated campaign types.
Thank you for looking into this specific scenario.

30 Haziran 2025 Pazartesi tarihinde saat 18:18:27 UTC+3 itibarıyla Google Ads API Forum Advisor şunları yazdı:

Enes Bulut

unread,
Jun 30, 2025, 7:33:18 PM6/30/25
to Google Ads API and AdWords API Forum
Adding one more question to my previous reply:
If this is a known limitation that demographic views (age_range_view, gender_view) do not return metrics for certain campaign types like Performance Max, could you please provide a comprehensive list of all campaign types that are subject to this limitation? Thanks again!

30 Haziran 2025 Pazartesi tarihinde saat 18:18:27 UTC+3 itibarıyla Google Ads API Forum Advisor şunları yazdı:

Hi,

Google Ads API Forum Advisor

unread,
Jul 1, 2025, 1:48:10 AM7/1/25
to en...@wask.co, adwor...@googlegroups.com
Hi,

Please be informed that I have removed your previous response from the forums as it contains the PII information.

Kindly note that metrics should not be compared between the campaign level and the demographic level, as the same campaign-level metrics you're trying to retrieve are not available at the ad group, ad, or demographic levels. Demographic-level data is accessible only for SMART campaigns and can be retrieved using the 'age_range_view ' and 'gender_view ' reports through the Google Ads API. You can use the following GAQL queries based on your specific requirement:
SELECT ad_group_criterion.age_range.type, campaign.name, ad_group.name, 
ad_group_criterion.system_serving_status, ad_group_criterion.bid_modifier, metrics.clicks, 
metrics.impressions, metrics.ctr, metrics.average_cpc, metrics.cost_micros, 
campaign.advertising_channel_type FROM age_range_view WHERE segments.date DURING LAST_7_DAYS
SELECT ad_group_criterion.gender.type, campaign.name, ad_group.name, ad_group_criterion.system_serving_status, 
ad_group_criterion.bid_modifier, metrics.clicks, metrics.impressions, metrics.ctr, metrics.average_cpc, metrics.cost_micros, 
campaign.advertising_channel_type FROM gender_view WHERE segments.date DURING LAST_7_DAYS
Note that if you are getting metrics as zero then it indicates that particular age range and gender view level metrics are not available for that filtered date. The above queries will fetch only the data from the SMART campaigns. Additionally, I would suggest you to refer to the Age and Gender documentation for more detailed information. 

For the PMax campaigns, it supports only these criteria which includes the age_range and these don't support gender criteria. Firstly, you need to have the criteria created at the campaign level using the campaignCriteria method. Then you can retrieve the same criteria using the campaign_criterion report from the Google Ads API. You can find the sample GAQL query for retrieving the age_range which are created at the campaign level: 
SELECT campaign_criterion.criterion_id, campaign.id, campaign_criterion.type, campaign_criterion.age_range.type, 
campaign.advertising_channel_type FROM campaign_criterion WHERE campaign.advertising_channel_type = 'PERFORMANCE_MAX' AND 
campaign_criterion.type IN ('AGE_RANGE')
I hope this clarifies. 
 

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-07-01 05:46:44Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01rgfrw:ref" (ADR-00316499)



Reply all
Reply to author
Forward
0 new messages