Unable to fetch asset performance metrics from ad_group_asset

60 views
Skip to first unread message

Shahil Verma

unread,
Feb 12, 2025, 7:52:29 AM2/12/25
to Google Ads API and AdWords API Forum
Hi team, 

Why I am unable to fetch performance metric data of assets that are present at adgroup level using this query - 


SELECT  asset.id, asset.type, campaign.id, metrics.clicks FROM ad_group_asset WHERE campaign.id = 22148688913

When I ran the query, I got 0 results. But when I removed the metrics.clicks field, it returned one row.

Screenshot 2025-02-12 181631.png

Right now, we need two separate queries to fetch assets—one from campaign_asset for campaign-level assets and another from ad_group_asset for ad group-level assets. Is there a way to fetch both in a single query, so we can get all assets at the ad group level along with campaign-level assets?

Thanks in advance!

Google Ads API Forum Advisor

unread,
Feb 12, 2025, 10:30:33 AM2/12/25
to shahilve...@gmail.com, adwor...@googlegroups.com
Hi,

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

​​​​Based on the provided information, it appears that the Google Ads API does not retrieve performance metrics for assets at the ad group level. When executing the query you provided without including metrics.clicks the returned asset ID is 201247689730, which corresponds to a SITELINK asset type.

Upon reviewing your campaign under campaign ID 22148688913, there are two ad groups (174579718038 and 201247689730). Navigating to the Responsive Search Ads under the 'Ads' section reveals that only one sitelink asset is associated with both ad groups.

However, there are no metrics called clicks associated for this asset ID (201247689730). In Google Ads reporting, zero-metric data is excluded when segmenting a report, provided all selected metrics are zero. This explains why including metrics.clicks in the query results in no data being returned if the values are zero. For further details, I recommend you to refer to the Zero Metrics documentation. I have also attached screenshots of both assets for your reference.

Kindly note that campaign and ad_group level assets cannot be fetched from a single query. Asset metrics are made available through a few resources: With these resources, asset metrics can be queried at each respective level. For example, when querying the ad_group_asset resource, the ad_group.id field can be used to segment the results, thereby retrieving metrics for each unique combination of ad_group and asset. I would recommend you to refer to the Asset metrics documentation for more detailed information. 
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vH1WR:ref" (ADR-00288061)

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5


 


Screenshot 2025-02-12 8.19.44 PM.png
Screenshot 2025-02-12 8.11.19 PM.png

Shahil Verma

unread,
Feb 12, 2025, 12:25:17 PM2/12/25
to Google Ads API and AdWords API Forum
Thank you so much for your quick response. It is really helpful.

Alexandre Airvault

unread,
Feb 12, 2025, 12:25:34 PM2/12/25
to Google Ads API and AdWords API Forum
The reason why your query returns 0 results when adding metrics.clicks is that performance metrics (like metrics.clicks) may not be available directly for ad_group_asset. Try using the asset_performance_view instead

Blobr - AI agents to optimise Google Ads spending 
Reply all
Reply to author
Forward
0 new messages